Classic Load Balancers should have connection draining enabled
Verifies that connection draining is enabled on Classic Load Balancers, so requests already in flight finish when an instance is deregistered instead of being cut off.
- service
- ELB
- severity
- Low
- scope
- evaluated in every region
How to fix it
In the console
EC2 → Load balancers → the load balancer → Attributes → Traffic configuration
With the AWS CLI
aws elb modify-load-balancer-attributes --load-balancer-name <load-balancer-name> --load-balancer-attributes ConnectionDraining={Enabled=true,Timeout=300} --region <region>With Terraform
resource "aws_elb" "this" {
connection_draining = true
connection_draining_timeout = 300
listener {
lb_port = 80
lb_protocol = "http"
instance_port = 80
instance_protocol = "http"
}
}
See which of your accounts this check is failing on.
Book a demo