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_instancesSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_thrifty.control.long_running_rds_db_instances --shareSteampipe Tables
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_idfrom aws_rds_db_instance;
Params
| Args | Name | Default | Description | Variable |
|---|---|---|---|---|
| $1 | rds_running_db_instance_age_max_days | | The maximum number of days DB instances are allowed to run. | |
| $2 | rds_running_db_instance_age_warning_days | | The number of days DB instances can be running before sending a warning. |