Description
Ensure that an EC2 Auto Scaling group registered with an Elastic Load Balancer (Classic, Application, or Network Load Balancer) uses ELB health checks, in addition to (or instead of) basic EC2 status checks, to determine instance health.
Rationale
EC2 status checks alone only detect whether the underlying instance is running, but they cannot detect whether the application running on the instance is actually healthy and able to serve traffic. When an Auto Scaling group relies solely on EC2 health checks, an instance whose application has hung or is failing to respond may continue to receive traffic and remain in service indefinitely. Enabling ELB health checks allows the Auto Scaling group to use the load balancer's application-level health check results to detect and replace unhealthy instances.
Impact
Ensures instances failing application-level health checks are detected and replaced automatically
Improves overall application availability by removing malfunctioning instances from service
Requires a properly tuned load balancer health check to avoid unnecessary instance churn
Default Value
By default, newly created Auto Scaling groups use EC2 health checks only, unless ELB health checks are explicitly enabled at creation or afterward.
Pre-Requisites
The Auto Scaling group registered with a target group or Classic Load Balancer with a configured health check
IAM permissions to update Auto Scaling group settings (autoscaling:UpdateAutoScalingGroup)
Test Plan
Sign in to the AWS Management Console at https://console.aws.amazon.com.
Navigate to EC2 > Auto Scaling Groups and select the group to review.
Open the Details tab and review the Health checks section.
Verify that ELB is included in the health check type (either alone or alongside EC2).
If only EC2 health checks are enabled for a group behind a load balancer, follow the implementation steps.
Implementation Steps
Sign in to the AWS Management Console at https://console.aws.amazon.com.
Navigate to EC2 > Auto Scaling Groups and select the group to update.
On the Details tab, locate Health checks and select Edit.
Enable ELB health checks, and configure an appropriate Health check grace period to allow instances time to start up before being evaluated.
Choose Update to save the change.
Verify the Details tab now shows ELB as part of the health check type.
Backout Plan
Sign in to the AWS Management Console at https://console.aws.amazon.com.
Navigate to EC2 > Auto Scaling Groups and select the affected group.
On the Details tab, locate Health checks and select Edit.
Disable ELB health checks, leaving only EC2 status checks enabled.
Choose Update to save the change.
Reference