turbot/aws_thrifty

Control: Long running RDS DBs should have reserved instances purchased for them

Description

Long running database servers should be associated with a reserve instance.

Usage

Run the control in your terminal:

powerpipe control run aws_thrifty.control.long_running_rds_db_instances

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_thrifty.control.long_running_rds_db_instances --share

Steampipe Tables

Params

ArgsNameDefaultDescriptionVariable
$1rds_running_db_instance_age_max_days
90
The maximum number of days DB instances are allowed to run.
$2rds_running_db_instance_age_warning_days
30
The number of days DB instances can be running before sending a warning.

SQL

select
arn as resource,
case
when date_part('day', now()-create_time) > $1 then 'alarm'
when date_part('day', now()-create_time) > $2 then 'info'
else 'ok'
end as status,
title || ' has been in use for ' || date_part('day', now()-create_time) || ' days.' as reason
, region, account_id
from
aws_rds_db_instance;

Tags