Skip to content

Instantly share code, notes, and snippets.

@adevil5
Last active March 10, 2023 20:27
Show Gist options
  • Save adevil5/25602fb99057977f7a01cfc8dd47ffb7 to your computer and use it in GitHub Desktop.
Save adevil5/25602fb99057977f7a01cfc8dd47ffb7 to your computer and use it in GitHub Desktop.
List All AWS Load Balancer Listeners - Protocol, SslPolicy

Run this with the aws cli

for lb_arn in $(aws elbv2 describe-load-balancers --query 'LoadBalancers[*].LoadBalancerArn' --output text); do aws elbv2 describe-listeners --load-balancer-arn $lb_arn --query 'Listeners[].[LoadBalancerArn,Protocol,SslPolicy]' --output text; done

Sample output: arn:aws:elasticloadbalancing:us-east-1:12341234:loadbalancer/app/good-elb/1234asdf1234asdf HTTPS ELBSecurityPolicy-TLS-1-2-2017-01 arn:aws:elasticloadbalancing:us-east-1:12341234:loadbalancer/app/good-elb/1234asdf1234asdf HTTP None

arn:aws:elasticloadbalancing:us-east-1:12341234:loadbalancer/app/okay-elb/qwer1234qwer1234 HTTP None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment