March 9, 2017 1 Comment
This code snippet will help you to get the list of all running EC2 instances across all regions in an AWS account. I have used python boto3 package for developing the code. This code will dynamically pick up all the aws ec2 regions. So the code will work perfectly without any modification even if a new region gets added to the AWS.
Note: Only the basic api calls just to list the instance details are mentioned in this program . Proper coding convention is not followed . 🙂