Skip to content

Instantly share code, notes, and snippets.

@mattrobenolt
Created August 1, 2012 06:10
Show Gist options
  • Save mattrobenolt/3224191 to your computer and use it in GitHub Desktop.
Save mattrobenolt/3224191 to your computer and use it in GitHub Desktop.
import ec2
ec2.credentials.ACCESS_KEY_ID = 'xxx'
ec2.credentials.SECRET_ACCESS_KEY = 'xxx'
print ec2.instances.all()
for i in ec2.instances.filter(state='running', name__like='^production'):
print i.state, i.tags['Name']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment