Control: 2.1.5 Ensure Images are not Publicly Available
Description
EC2 allows you to make an AMI public, sharing it with all AWS accounts.
Publicly sharing an AMI with all AWS accounts could expose organizational data and configuration information.
Remediation
Perform the steps below to set an AMIs to Private.
From Console:
- Login to the EC2 console at https://console.aws.amazon.com/ec2/.
- In the left pane, under
Images
, clickAMIs
. - Confirm the
Owned by me
is set. - Select the AMI from the list.
- Click on the
Permissions
Tab. - Click on
Edit
. - Click on the radio button
Private
.
Add AWS Account Number if you have a need to share with other Internal AWS accounts that your Organization owns.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.cis_compute_service_v100_2_1_5
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.cis_compute_service_v100_2_1_5 --share
SQL
This control uses a named query:
ec2_ami_restrict_public_access