Control: EC2 reserved instances scheduled for expiration should be reviewed
Description
EC2 reserved instances that are scheduled for expiration or have expired in the preceding 30 days should be reviewed.
Usage
Run the control in your terminal:
powerpipe control run aws_thrifty.control.ec2_reserved_instance_lease_expiration_daysSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_thrifty.control.ec2_reserved_instance_lease_expiration_days --shareSteampipe Tables
SQL
select reserved_instance_id as resource, case when date_part('day', end_time - now()) <= $1 then 'alarm' else 'ok' end as status, title || ' lease expires in ' || date_part('day', end_time-now()) || ' days.' as reason , region, account_idfrom aws_ec2_reserved_instance;
Params
| Args | Name | Default | Description | Variable |
|---|---|---|---|---|
| $1 | ec2_reserved_instance_expiration_warning_days | | The number of days reserved instances can be running before sending a warning. |