Created
December 12, 2011 23:56
-
-
Save jedberg/1469730 to your computer and use it in GitHub Desktop.
Sample usage of DescribeInstanceStatus
This file contains 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
regions = boto.ec2.regions() | |
for reg in regions: | |
conn = reg.connect() | |
instances = conn.get_all_instance_status() | |
for inst in instances: | |
if inst.events: | |
print "%s: %s\t%s" % (inst.id, | |
inst.events[0].description, | |
inst.events[0].not_after) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment