π AWS EC2 Auto Scaling Group behind ELB doesn't use ELB health check π’
- Contextual name: π Auto Scaling Group behind ELB doesn't use ELB health check π’
- ID:
/ce/ca/aws/autoscaling/group-with-elb-without-elb-health-check
- Located in: π AWS Auto Scaling
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
RELIABILITY
Similar Policiesβ
- Internal
dec-x-71d45f32
Similar Internal Rulesβ
Rule | Policies | Flags |
---|---|---|
βοΈ dec-x-71d45f32 | 1 |
Logicβ
- π§ prod.logic.yaml π’
Descriptionβ
Descriptionβ
Ensure that AWS EC2 Auto Scaling Groups (ASGs) associated with Elastic Load Balancers (ELBs) are configured to use ELB health checks rather than the default EC2 health checks.
Rationaleβ
ELB health checks provide a more accurate and application-aware mechanism for determining instance health compared to standard EC2 status checks. By integrating directly with the load balancer, ELB health checks reflect the actual ability of instances to serve traffic. This enables Auto Scaling Groups to make more informed scaling and replacement decisions, leading to faster recovery from failures and improved application availability.
Configuring ASGs to use ELB health checks ensures that scaling decisions are based on the same health criteria used by the load balancer itself, promoting more consistent and reliable traffic distribution.
Impactβ
May introduce additional configuration and management overhead compared to the default EC2 health check type.
Auditβ
This policy flags an AWS EC2 Auto Scaling Group as
INCOMPLIANT
if:... see more
Remediationβ
Remediationβ
From Command Lineβ
By default, Amazon EC2 Auto Scaling relies on EC2 status checks to determine instance health.
- To configure the ASG to use ELB health checks to ensure that instances failing load balancer health criteria are automatically replaced use
update-auto-scaling-group
command:aws autoscaling update-auto-scaling-group \
--auto-scaling-group-name {{auto-scaling-group-name}} \
--health-check-type ELB
- (Optional but recommended) Configure a health check grace period (in seconds) to allow instances sufficient time to initialize before being evaluated by health checks:
aws autoscaling update-auto-scaling-group \
--auto-scaling-group-name {{auto-scaling-group-name}} \
--health-check-grace-period 300