Check provider logo

Classic Load Balancer has connection draining enabled

elb_connection_draining_enabled

Severitymedium
Serviceelb
by Prowler

Classic Load Balancer has connection draining enabled, so deregistering or unhealthy instances stop receiving new requests while existing connections are allowed to complete within the configured drain window.

Risk

Without connection draining, instance removals or health failures can terminate in-flight requests, leading to partial transactions, broken sessions, and inconsistent application state. This reduces availability and can impact data integrity during deployments, scaling, or failover events.

Run this check with Prowler CLI

prowler aws --checks elb_connection_draining_enabled

Recommendation

Enable connection draining on all Classic Load Balancers and set a drain interval aligned to typical request latency. Coordinate autoscaling and deployments to allow graceful instance shutdowns. Monitor errors and retries to validate behavior and adjust the timeout conservatively to protect availability and integrity.

Remediation

CLI

aws elb modify-load-balancer-attributes --load-balancer-name <example_resource_name> --load-balancer-attributes '{"ConnectionDraining":{"Enabled":true}}'

Native IaC
Terraform
Other
  1. Open the EC2 console and go to Load Balancers (Classic)
  2. Select the Classic Load Balancer
  3. Choose the Attributes tab, then click Edit
  4. Check Enable connection draining (leave default timeout or set as needed)
  5. Click Save changes

Source Code

Resource Type

AwsElbLoadBalancer

References