Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ec2 = boto3.resource('ec2')
- instance_list = ec2.instances.filter(Filters=[{'Name': "instance- state-name", "Values": ['running']}]).pages()
- for page in instance_list:
- for instance in page:
- tags = instance.tags
- image_id = instance.image_id
- ... run checks ...
Add Comment
Please, Sign In to add comment