turbot/steampipe-mod-aws-compliance

Control: EC2 auto scaling groups should cover multiple availability zones

Description

This control checks whether an AWS EC2 Auto Scaling group spans multiple availability zones. The control fails if an auto scaling group does not span multiple availability zones.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.autoscaling_group_multiple_az_configured

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

select
autoscaling_group_arn as resource,
case
when jsonb_array_length(availability_zones) > 1 then 'ok'
else 'alarm'
end as status,
title || ' has ' || jsonb_array_length(availability_zones) || ' availability zone(s).' as reason
, region, account_id
from
aws_ec2_autoscaling_group;

Tags