Control: Long running Redshift clusters should have reserved nodes purchased for them
Description
Long running clusters should be associated with reserved nodes, which provide a significant discount.
Usage
Run the control in your terminal:
powerpipe control run aws_thrifty.control.redshift_cluster_max_age
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_thrifty.control.redshift_cluster_max_age --share
Steampipe Tables
Params
Args | Name | Default | Description | Variable |
---|---|---|---|---|
$1 | redshift_running_cluster_age_max_days |
| The maximum number of days clusters are allowed to run. | |
$2 | redshift_running_cluster_age_warning_days |
| The number of days clusters can be running before sending a warning. |
SQL
select arn as resource, case when date_part('day', now() - cluster_create_time) > $1 then 'alarm' when date_part('day', now() - cluster_create_time) > $2 then 'info' else 'ok' end as status, title || ' created on ' || cluster_create_time || ' (' || date_part('day', now() - cluster_create_time) || ' days).' as reason , region, account_idfrom aws_redshift_cluster;