Created
December 30, 2012 03:01
-
-
Save anonymous/4410745 to your computer and use it in GitHub Desktop.
Uses boto to dump instance information.
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
from boto import ec2 | |
regions = ec2.regions() | |
for region in regions: | |
print region.name | |
conn = ec2.connect_to_region(region.name) | |
instances = conn.get_all_instances() | |
if len(instances) > 0: | |
for i in instances: | |
current = i.instances[0] | |
print current.id | |
print current.image_id | |
print current.ip_address | |
print current.launch_time | |
else: | |
print '0 instances' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment