Benchmark: EC2
Description
This benchmark provides a set of controls that detect Terraform AWS EC2 resources deviating from security best practices.
Usage
Install the mod:
mkdir dashboardscd dashboardspowerpipe mod initpowerpipe mod install github.com/turbot/steampipe-mod-terraform-aws-compliance
Start the Powerpipe server:
steampipe service startpowerpipe server
Open http://localhost:9033 in your browser and select EC2.
Run this benchmark in your terminal:
powerpipe benchmark run terraform_aws_compliance.benchmark.ec2
Snapshot and share results via Turbot Pipes:
powerpipe benchmark run terraform_aws_compliance.benchmark.ec2 --share
Controls
- EC2 AMI copy should be encrypted with KMS CMK
- EC2 AMI copy should be encrypted
- EC2 AMI should be encrypted
- EC2 AMI image builder components should be encrypted with KMS CMK
- EC2 AMI image builder distribution configurations should be encrypted with KMS CMK
- EC2 AMI image builder image recipes should be encrypted with KMS CMK
- EC2 AMI launch permission should be restricted
- EBS default encryption should be enabled
- EC2 instance detailed monitoring should be enabled
- EC2 instance EBS encryption should be enabled
- EC2 instance should have EBS optimization enabled
- EC2 instances should not have a public IP address
- Ensure EC2 instances do not use default VPC
- EC2 instances should not use multiple ENIs
- EC2 instances termination protection should be enabled
- EC2 instances should not contain secrets in user data
- EC2 instances should use IMDSv2
- EC2 launch configuration EBS encryption should be enabled
- EC2 launch configuration should not have a metadata response hop limit greater than 1
- EC2 launch template should not have a metadata response hop limit greater than 1