turbot/aws_thrifty

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 login
powerpipe control run aws_thrifty.control.redshift_cluster_max_age --share

Steampipe Tables

Params

ArgsNameDefaultDescriptionVariable
$1redshift_running_cluster_age_max_days
90
The maximum number of days clusters are allowed to run.
$2redshift_running_cluster_age_warning_days
30
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_id
from
aws_redshift_cluster;

Tags