Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find AWS Load Balancer ARN from its name with python api?

Given a load balancer name, is it possible to find its ARN with AWS API? The closest I see is the describe_load_balancers function, but its output doesn't include ARN. Am I missing something simple?

Full context: The script adds "DDoSAttackBitsPerSecond" metrics to a AWS Dashboard, and metric description includes the ARN of the load balancer as one of its dimensions.

Any suggestions appreciated,

Mike

like image 557
Mikey Avatar asked Jan 28 '26 10:01

Mikey


1 Answers

Doh, I was using boto3.client('elb'), which doesn't return ARN, instead of boto3.client('elbv2'), which does. I hope someone will find this useful...

like image 142
Mikey Avatar answered Jan 29 '26 23:01

Mikey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!