Control: EC2 Auto Scaling groups should use EC2 launch templates
Description
This control checks whether an AWS EC2 Auto Scaling group is created from an EC2 launch template. This control fails if an AWS EC2 Auto Scaling group is not created with a launch template or if a launch template is not specified in a mixed instances policy.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.autoscaling_group_uses_ec2_launch_template
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.autoscaling_group_uses_ec2_launch_template --share
SQL
This control uses a named query:
select autoscaling_group_arn as resource, case when launch_template_id is not null then 'ok' else 'alarm' end as status, case when launch_template_id is not null then title || ' using an EC2 launch template.' else title || ' not using an EC2 launch template.' end as reason , region, account_idfrom aws_ec2_autoscaling_group;