Skip to main content

Overview

OpenSRE uses AWS Elastic Load Balancing (ELB v2 — ALB/NLB) to bridge a public-facing alert (DNS/LB) down to the EC2 instances behind it. It maps target groups to registered targets and flags unhealthy or draining targets, pairing with the EC2 tools to identify which application tier is driving load on a downstream dependency. All ELB API calls are read-only and routed through the shared aws_sdk_client allowlist, so the integration cannot mutate your load balancers or target groups.

Prerequisites

  • AWS credentials configured per the AWS integration (role ARN recommended for verify; ambient credentials for tool calls)
  • An ELB v2 (ALB or NLB) target group you want OpenSRE to investigate
  • IAM permissions for the two ELB describe actions listed below

Setup

ELB has no separate setup target. Configure the AWS integration, then ensure alerts resolve sources with target group or load balancer ARNs.

Environment variables

The tool accepts target_group_arns (canonical), the singular target_group_arn alias, and load_balancer_arn as parameters. When invoked via resolved sources, it reads target_group_arns and load_balancer_arns from the resolved ec2 source (using the first load balancer ARN).

Credentials

ELB uses the same AWS account as the AWS integration. Tool calls use the ambient boto3 credential chain (environment keys, shared credentials profile, or attached instance/task role). They do not assume AWS_ROLE_ARN for the API call.

IAM permissions

The integration only needs two read-only ELB v2 actions:
Attach this policy to the identity the OpenSRE process runs as (and to the role used by opensre integrations verify aws if you use assume-role). If you already use the AWS managed ReadOnlyAccess policy, both actions are covered.

Tools

The tool becomes available to the planner whenever target_group_arns, target_group_arn, or load_balancer_arn is present in the resolved ec2 sources.

Use cases

  • Mapping a target group ARN or load balancer ARN to the EC2 instance IDs serving traffic
  • Identifying unhealthy or draining targets correlated with a request-path alert
  • Bridging DNS → LB → EC2 when investigating a non-Kubernetes topology

Gotcha

Multi-target-group ALBs are common — a single ALB can front several listener rules, each pointing at a different target group. Pass the full target_group_arns list rather than a single target_group_arn if the load balancer has more than one target group, otherwise the tool only reports health for the one target group you named and unhealthy targets on the other groups will be silently missed.

Verify

ELB shares the AWS integration’s connection check — there is no separate elb verify target. A successful AWS verify confirms credentials are valid; the ELB tool itself becomes available once a target group ARN or load balancer ARN is present in the resolved sources.

Troubleshooting

Security

  • All ELB API calls are read-only.
  • Prefer a least-privilege IAM policy with only the two describe actions above if you do not need broader AWS access.
  • Store AWS credentials in .env or your secret manager — not in source control.