Skip to main content
Amazon Elastic Load Balancing (ELBv2) automatically distributes incoming application traffic across multiple targets, such as Amazon EC2 instances, containers, and IP addresses. It provides high availability, automatic scaling, and robust security features, and supports multiple load balancer types (Application, Network, and Gateway). This handler focuses on Application Load Balancers (ALBs) and retrieves details about load balancers, listeners, listener rules, target groups, and target health.

Example

To create the ‘AWSElasticLoadBalancerHandler’ object, you must provide AWS credentials:
elb_handler_test.py
Get ELB Details:
Fetches all Application Load Balancer (ALB) details, including listeners, rules, target groups, and target health.
Collect Target Groups from Default Actions and Rules:
Collects all target groups referenced in listeners’ default actions and custom rules.
Fetch Detailed Target Group Info:
Fetches complete target group configuration and health status, including protocol, port, health check config, and registered targets.