Skip to content

Instantly share code, notes, and snippets.

@garnaat
Created October 20, 2013 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save garnaat/7076677 to your computer and use it in GitHub Desktop.
Save garnaat/7076677 to your computer and use it in GitHub Desktop.
Simple example of getting a snapshot and accessing its attributes.
import boto.ec2
ec2con = ec2.connect_to_region("us-west-1")
snap = ec2con.get_all_snapshots(['snap-3b82a650'])[0]
print(snap.id)
print(snap.volume_id)
print(snap.status)
print(snap.start_time)
print(snap.owner_id)
print(snap.volume_size)
print(snap.description)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment