Table: aws_rds_cluster_snapshots

This table shows data for Amazon Relational Database Service (RDS) Cluster Snapshots.

https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DBClusterSnapshot.html (opens in a new tab)

The primary key for this table is arn.

Columns

NameType
_cq_iduuid
_cq_parent_iduuid
account_idutf8
regionutf8
arn (PK)utf8
tagsjson
attributesjson
allocated_storageint64
availability_zoneslist<item: utf8, nullable>
cluster_create_timetimestamp[us, tz=UTC]
db_cluster_identifierutf8
db_cluster_snapshot_arnutf8
db_cluster_snapshot_identifierutf8
db_system_idutf8
db_cluster_resource_idutf8
engineutf8
engine_modeutf8
engine_versionutf8
iam_database_authentication_enabledbool
kms_key_idutf8
license_modelutf8
master_usernameutf8
percent_progressint64
portint64
snapshot_create_timetimestamp[us, tz=UTC]
snapshot_typeutf8
source_db_cluster_snapshot_arnutf8
statusutf8
storage_encryptedbool
storage_typeutf8
vpc_idutf8

Example Queries

These SQL queries are sampled from CloudQuery policies and are compatible with PostgreSQL.

RDS cluster snapshots and database snapshots should be encrypted at rest

(
  SELECT
    'RDS cluster snapshots and database snapshots should be encrypted at rest'
      AS title,
    account_id,
    arn AS resource_id,
    CASE
    WHEN storage_encrypted IS NOT true THEN 'fail'
    ELSE 'pass'
    END
      AS status
  FROM
    aws_rds_cluster_snapshots
)
UNION
  (
    SELECT
      'RDS cluster snapshots and database snapshots should be encrypted at rest'
        AS title,
      account_id,
      arn AS resource_id,
      CASE WHEN encrypted IS NOT true THEN 'fail' ELSE 'pass' END AS status
    FROM
      aws_rds_db_snapshots
  );

RDS snapshots should be private

SELECT
  'RDS snapshots should be private' AS title,
  account_id,
  arn AS resource_id,
  CASE
  WHEN attrs->>'AttributeName' IS NOT DISTINCT FROM 'restore'
  AND (attrs->'AttributeValues')::JSONB ? 'all'
  THEN 'fail'
  ELSE 'pass'
  END
    AS status
FROM
  aws_rds_cluster_snapshots, jsonb_array_elements(attributes) AS attrs;