turbot/steampipe-mod-aws-compliance

Control: Auto Scaling groups with a load balancer should use health checks

Description

The Elastic Load Balancer (ELB) health checks for AWS Elastic Compute Cloud (AWS EC2) Auto Scaling groups support maintenance of adequate capacity and availability.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.autoscaling_group_with_lb_use_health_check

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_compliance.control.autoscaling_group_with_lb_use_health_check --share

SQL

This control uses a named query:

select
autoscaling_group_arn as resource,
case
when load_balancer_names is null and target_group_arns is null then 'alarm'
when health_check_type != 'ELB' then 'alarm'
else 'ok'
end as status,
case
when load_balancer_names is null and target_group_arns is null then title || ' not associated with a load balancer.'
when health_check_type != 'ELB' then title || ' does not use ELB health check.'
else title || ' uses ELB health check.'
end as reason
, region, account_id
from
aws_ec2_autoscaling_group;

Tags