turbot/aws_compliance

Query: ec2_instance_not_older_than_180_days

Usage

powerpipe query aws_compliance.query.ec2_instance_not_older_than_180_days

Steampipe Tables

SQL

select
instance_id as resource,
launch_time,
case
when launch_time >= (current_date - interval '180 days') then 'ok'
else 'alarm'
end as status,
title || ' created ' || to_char(launch_time , 'DD-Mon-YYYY') || ' (' || extract(day from current_timestamp - launch_time) || ' days).' as reason
, region, account_id
from
aws_ec2_instance;

Controls

The query is being used by the following controls: