Review RDS cluster snapshot encryption

Check the actual encryption of RDS cluster snapshots and their source clusters together.

Description

An Aurora cluster snapshot inherits the source cluster’s encryption. New Aurora clusters are encrypted by default, but snapshots and clones of an older unencrypted cluster can remain unencrypted.

Potential impact

An unauthorized copy of an unencrypted snapshot can expose recovery data. Restrict snapshot sharing and KMS key access separately.

Remediation

Copying an unencrypted Aurora snapshot leaves it unencrypted. Keep the source and restore to a new cluster ID with the required key. For a Terraform restore, provision a writer instance, verify the data and key, then take an encrypted snapshot with a distinct ID. For a live migration, retain the required keys and account for final writes before cutover.

Examples

Supply the engine, authentication and network settings for your cluster. Keep a separate backup because skip_final_snapshot = true skips the final snapshot on deletion.

Encryption setting omitted

hcl
resource "aws_db_cluster_snapshot" "db_snapshot" {
  db_cluster_identifier          = aws_rds_cluster.example2.id
  db_cluster_snapshot_identifier = "resourcetestsnapshot1234"
}

resource "aws_rds_cluster" "example2" {
  cluster_identifier  = "example"
  skip_final_snapshot = true
}

Encryption explicitly enabled

hcl
resource "aws_db_cluster_snapshot" "db_snapshot" {
  db_cluster_identifier          = aws_rds_cluster.example.id
  db_cluster_snapshot_identifier = "resourcetestsnapshot1234"
}

resource "aws_rds_cluster" "example" {
  cluster_identifier  = "example"
  skip_final_snapshot = true
  storage_encrypted   = true
}

The examples use different Terraform cluster addresses but the same physical cluster and snapshot IDs. The second requests storage_encrypted = true on the source. Neither specifies a snapshot to restore. Check the plan for replacement before changing an existing deployment.

References