Control: Ensure Images (AMI) are not older than 90 days
Description
Ensure that your AMIs are not older than 90 days.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.ec2_ami_not_older_than_90_days
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.ec2_ami_not_older_than_90_days --share
SQL
This control uses a named query:
select image_id as resource, case when creation_date >= (current_date - interval '90 days') then 'ok' else 'alarm' end as status, title || ' created ' || to_char(creation_date , 'DD-Mon-YYYY') || ' (' || extract(day from current_timestamp - creation_date) || ' days).' as reason , region, account_idfrom aws_ec2_ami;