Using Python and Boto3 to get Instance Tag information

Here are 2 sample functions to illustrate how you can get information about Tags on instances using Boto3 in AWS. import boto3 def get_instance_name(fid): # When given an instance ID as str e.g. ‘i-1234567’, return the instance ‘Name’ from the name tag. ec2 = boto3.resource(‘ec2’) ec2instance = ec2.Instance(fid) instancename =… Continue reading