turbot/steampipe-mod-aws-compliance

Control: Neptune DB cluster snapshots should not be public

Description

This control checks whether a Neptune manual DB cluster snapshot is public. The control fails if a Neptune manual DB cluster snapshot is public.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.neptune_db_cluster_snapshot_prohibit_public_access

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

select
db_cluster_snapshot_arn as resource,
case
when cluster_snapshot -> 'AttributeValues' = '["all"]' then 'alarm'
else 'ok'
end status,
case
when cluster_snapshot -> 'AttributeValues' = '["all"]' then title || ' publicly accessible.'
else title || ' not publicly accessible.'
end reason
, region, account_id
from
aws_neptune_db_cluster_snapshot,
jsonb_array_elements(db_cluster_snapshot_attributes) as cluster_snapshot;

Tags