Auto Scaling group associated with a load balancer has ELB health checks enabled
autoscaling_group_elb_health_check_enabled
EC2 Auto Scaling groups attached to a load balancer are evaluated for ELB-based health checks that use the load balancer's target health instead of instance-only checks.
Risk
Without ELB health checks, the group may keep instances that fail load balancer probes, causing:
- Reduced availability from routing to bad targets
- Higher error rates impacting transaction integrity
- Inefficient scaling and increased costs
prowler aws --checks autoscaling_group_elb_health_check_enabled
Recommendation
Enable ELB health checks for Auto Scaling groups behind load balancers to reflect real client reachability. Apply high availability and defense in depth by:
- Using application-appropriate LB probes
- Tuning grace and threshold settings to avoid flapping
- Monitoring health metrics and alerts
Remediation
aws autoscaling update-auto-scaling-group --auto-scaling-group-name <auto-scaling-group-name> --health-check-type ELB
# CloudFormation: Enable ELB health checks for the Auto Scaling group
Resources:
<example_resource_name>:
Type: AWS::AutoScaling::AutoScalingGroup
Properties:
HealthCheckType: ELB # Remediation: use ELB health checks so the ASG evaluates instance health via the load balancer
# Enable ELB health checks on the Auto Scaling group
resource "aws_autoscaling_group" "<example_resource_name>" {
health_check_type = "ELB" # Remediation: ensures ASG uses load balancer health status
}
- In AWS Console, go to EC2 > Auto Scaling Groups
- Select the Auto Scaling group
- On the Details tab, click Edit under Health checks
- Under Additional health check types, select Elastic Load Balancing (ELB)
- Click Update/Save
Source Code
Resource Type
AwsAutoScalingAutoScalingGroup
References
- https://docs.aws.amazon.com/securityhub/latest/userguide/autoscaling-controls.html#autoscaling-1
- https://www.trendmicro.com/cloudoneconformity/knowledge-base/aws/AutoScaling/auto-scaling-group-health-check.html
- https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-add-elb-healthcheck.html#as-add-elb-healthcheck-console