List out auto scaling group names with a specific application tag using boto3

Question:

I was trying to fetch auto scaling groups with Application tag value as ‘CCC’.

The list is as below,

The script I coded below gives output which includes one ASG without CCC tag.

The output which I am getting is as below,

Where as 'prd-dcc-ein-w2' is an asg with a different tag 'gweb'. And the last one (dev-ccc-msp-agt-asg) in the CCC ASG list is missing. I need output as below,

Am I missing something ?.

Answer:

I got it working with below script.

Feel free to ask if you have any doubts.

Leave a Reply