Skip to content
Advertisement

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

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

The list is as below,

JavaScript

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

JavaScript

The output which I am getting is as below,

JavaScript

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,

JavaScript

Am I missing something ?.

Advertisement

Answer

I got it working with below script.

JavaScript

Feel free to ask if you have any doubts.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement