Guest User

Untitled

a guest
Jul 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. ec2 = boto3.resource('ec2')
  2. instance_list = ec2.instances.filter(Filters=[{'Name': "instance- state-name", "Values": ['running']}]).pages()
  3.  
  4. for page in instance_list:
  5. for instance in page:
  6. tags = instance.tags
  7. image_id = instance.image_id
  8. ... run checks ...
Add Comment
Please, Sign In to add comment