Last active
March 8, 2016 14:12
-
-
Save iolloyd/b0a66f5d99fe06165ef9 to your computer and use it in GitHub Desktop.
Get all available ec2 instances
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto | |
from pprint import pprint | |
ec2 = boto.connect_ec2() | |
instances = [x for y in ec2.get_all_instances() for x in y.instances] | |
for x in instances: | |
pprint(x.__dict__) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment