RDS cluster snapshots should not be publicly shared

Description

Ensures that your Amazon RDS cluster snapshots are not publicly accessible to protect sensitive data from unauthorized access.

Rationale

Public RDS snapshots can be accessed and restored by any AWS account worldwide. This could expose confidential database contents, leading to data breaches or regulatory violations. Snapshots should never be publicly shared unless explicitly required and controlled.

Remediation

From the console

Follow the instructions in the Stop sharing a manual DB snapshot with an AWS account AWS Console docs.

From the command line

Run modify-db-cluster-snapshot-attribute with the cluster snapshot identifier, attribute name, and values to remove to revoke a specific AWS account’s permission to restore the DB snapshot.

aws rds modify-db-cluster-snapshot-attribute \
    --db-cluster-snapshot-identifier yourdbsnapshot \
    --attribute-name restore \
    --values-to-remove "all"