How to find the list of unused load balancers using AWS cli

Viewed 220

I am trying to find out the list of Empty/Unused Load Balancer with all hosts in out of service status for a specific account using AWS cli. I know this query will help in fetching the list of used SGs.

aws elb describe-load-balancers --query 'LoadBalancerDescriptions[*].SecurityGroups[*]' --output text | tr '\t' '\n' | sort | uniq

Also trying to print the cloudwatch metric for avg amount of errors returned from each load balancer.

0 Answers
Related