Skip to content

Instantly share code, notes, and snippets.

@jedberg
Created December 12, 2011 23:56
Show Gist options
  • Save jedberg/1469730 to your computer and use it in GitHub Desktop.
Save jedberg/1469730 to your computer and use it in GitHub Desktop.
Sample usage of DescribeInstanceStatus
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