Control: 2.1.4 Ensure Images (AMI) are not older than 90 days
Description
Ensure that your AMIs are not older than 90 days.
Using up-to-date AMIs will provide many benefits from OS updates and security patches helping to ensure reliability, security and compliance.
Remediation
Perform these steps if the Creation date is older than 90 days.
From Console:
- Login to the EC2 console at https://console.aws.amazon.com/ec2/.
- In the left pane, under
Images
, clickAMIs
. - Select the
AMI
to be updated. - Click on
Launch
. - Go through the EC2 Instance creation process.
- Apply all system, security and application updates that are applicable to the EC2 instance.
- Once completed click on
Instance state
,Stop instance
. - Click on
Actions, Image and templates, Create image
. - Once the image process has complete return to the AMI list but clicking on
Images, AMIs
. - Select the AMI that is older than 90 days.
- Click on
Actions, Deregister
.
Repeat these steps for any other AMIs older than 90 days.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.cis_compute_service_v100_2_1_4
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.cis_compute_service_v100_2_1_4 --share
SQL
This control uses a named query:
ec2_ami_not_older_than_90_days