Boto3 does not list my Application Load Balancer

Question:

I am new to boto3 and am using it for automating the process of register and deregister EC2 instances from load balancers.

This is my sample Python code:

This script only lists all my classic load balancers but my application load balancers are not listed.

How do I list my application load balancer and list all the instances attached to it?

Answer:

Strangely enough, Application Load Balancers are only visible via the v2 interface:

See: boto3 ElasticLoadBalancingv2 documentation

Leave a Reply