I\'m trying to obtain tags from instances in my AWS account using Python\'s boto library.
While this snippet works correctly bringing all tags:
t
For boto3 you will need to do this.
import boto3 ec2 = boto3.resource('ec2') vpc = ec2.Vpc('') instance_iterator = vpc.instances.all() for instance in instance_iterator: for tag in instance.tags: print('Found instance id: ' + instance.id + '\ntag: ' + tag)