turbot/steampipe-mod-aws-compliance

Control: 9 Redshift clusters should not use the default database name

Description

This control checks whether an Amazon Redshift cluster has changed the database name from its default value. The control will fail if the database name for a Redshift cluster is set to dev.

When creating a Redshift cluster, you should change the default database name to a unique value. Default names are public knowledge and should be changed upon configuration. As an example, a well-known name could lead to inadvertent access if it was used in IAM policy conditions.

Remediation

You cannot change the database name for your Amazon Redshift cluster after it is created. To create a new cluster, follow the instructions here.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.foundational_security_redshift_9

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_compliance.control.foundational_security_redshift_9 --share

SQL

This control uses a named query:

select
arn as resource,
case
when db_name = 'dev' then 'alarm'
else 'ok'
end as status,
case
when db_name = 'dev' then title || ' using default database name.'
else title || ' not using default database name.'
end as reason
, region, account_id
from
aws_redshift_cluster;

Tags