Lesson 2 of 3 Data Protection for Storage and Databases

Encrypting Storage and Databases at Rest

This lesson explains each storage and database service's rules for encryption at rest with KMS, when encryption can be enabled, which keys are allowed and what happens to snapshots and replicas, especially for resources that already exist.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify when each service allows encryption to be chosen.
  • Explain how encryption carries over to snapshots and replicas and how encrypted copies are shared.
  • Describe the preventive and detective controls that enforce encryption.
  • Encrypt an existing unencrypted RDS database.

Service by service

Every storage and database service encrypts data at rest with KMS, but they differ in when encryption can be chosen, and those differences appear in exam questions. Amazon S3 offers SSE-S3, the default; SSE-KMS; DSSE-KMS, which applies two layers of encryption; and SSE-C, with a key you supply on each request; since April 2026, new buckets block SSE-C requests unless the bucket's settings allow them. S3 Bucket Keys reduce KMS calls, and changing the encryption of existing objects requires copying them, for example with S3 Batch Operations. Amazon EBS encrypts volumes and snapshots, and encryption by default can be turned on per account and Region. An existing unencrypted volume is encrypted by snapshotting it and copying the snapshot with encryption.

RDS and Aurora encryption, covering storage, backups, snapshots and replicas, must be chosen when the instance is created. An existing instance is encrypted by taking a snapshot, copying it with encryption and restoring from the copy, and cross-Region replicas need a key in the target Region. DynamoDB is always encrypted, and the key type can be switched at any time. EFS encryption at rest can be set only at creation, and encryption in transit uses the mount helper's TLS option. Redshift encryption can be enabled on an existing cluster, with migration in the background.

ElastiCache, OpenSearch, Neptune and DocumentDB generally set encryption at creation. For SQS, SNS, Kinesis and CloudWatch Logs, producers and the services that write must be allowed to use the key, or writes fail. The following table summarises the services.

ServiceHow encryption worksKey facts
Amazon S3SSE-S3 (default), SSE-KMS, DSSE-KMS (two layers), SSE-C (customer-provided key; blocked by default on new buckets since April 2026)Bucket default encryption; S3 Bucket Keys cut KMS calls; changing encryption of existing objects requires copying them (S3 Batch Operations)
Amazon EBSKMS envelope encryption of volumes and snapshotsEncryption by default per account and Region; encrypt an existing volume by snapshotting and copying the snapshot with encryption
Amazon RDS and AuroraStorage, backups, snapshots and replicas encrypted with KMSMust be chosen at creation; to encrypt an existing instance: snapshot, copy encrypted, restore. Cross-Region replicas need a key in the target Region
Amazon DynamoDBAlways encryptedChoose AWS owned (default), AWS managed or customer managed key; can switch at any time
Amazon EFSKMS encryption of file system dataOnly at creation; encrypt in transit with the mount helper's TLS option
Amazon RedshiftKMS or HSMCan be enabled on an existing cluster (migration runs in the background)
ElastiCache, OpenSearch, Neptune, DocumentDBKMS at restGenerally chosen at creation; check each service
SQS, SNS, Kinesis, CloudWatch LogsSSE with KMSProducers and services that write must be allowed to use the key
Sort into groups

Can encryption be added later?

Exam skills 5.2.1

Decide whether each service lets you enable encryption on an existing resource in place.

Log in to try this activity Interactive activities are free with an account.

Snapshots, replicas and sharing

Encryption applies to snapshots and replicas as well as to the original resources. The following list describes how encryption carries over and how encrypted copies are shared.

  • Snapshots of encrypted resources are encrypted with the same key; copies can be re-encrypted with a different key.
  • Sharing an encrypted snapshot requires a customer managed key shared with the target account; AWS managed keys cannot be shared.
  • Cross-Region copies and replicas are encrypted with a key in the destination Region, or with a multi-Region key replica.
  • Deleting or disabling the key makes every encrypted resource, snapshot and backup unreadable.

The following diagram follows an unencrypted RDS database to its encrypted copy.

Encrypting an existing RDS database, which cannot be done in place. A snapshot is copied with a KMS key and restored as an encrypted instance; AWS DMS can replicate later changes to avoid lost writes or long downtime. After cutover, the old instance and unencrypted snapshot are deleted and an SCP prevents a recurrence.
The scenario is illustrative.
True or false

Encrypted snapshots and replicas

Exam skills 5.2.1 · 5.2.4

Check how encryption carries over to snapshots and copies.

Log in to try this activity Interactive activities are free with an account.

Enforcing encryption at scale

Across an organisation, encryption is enforced with preventive controls, which stop unencrypted resources from being created, and detective controls, which find any that exist. Preventive controls include EBS encryption by default, which can be set across accounts with declarative policies. An SCP can deny rds:CreateDBInstance when rds:StorageEncrypted is false, and CloudFormation hooks with Guard rules block unencrypted resources at deployment. Detective controls include Config rules such as encrypted-volumes, rds-storage-encrypted and s3-default-encryption-kms, and Security Hub FSBP controls, which score the results. The following table summarises the controls.

ControlType
EBS encryption by default (and declarative policies)Preventive
SCP denying rds:CreateDBInstance when rds:StorageEncrypted is falsePreventive
CloudFormation hooks and Guard rulesPreventive at deployment
Config rules (encrypted-volumes, rds-storage-encrypted, s3-default-encryption-kms)Detective
Security Hub FSBP controlsDetective, scored
Sort into groups

Preventive or detective?

Exam skills 5.2.1 · 6.3.1

Classify each encryption control.

Log in to try this activity Interactive activities are free with an account.
Worked example

Encrypting an existing RDS database

An audit finds a production PostgreSQL instance created years ago without encryption. RDS cannot enable encryption in place, so the database is moved to an encrypted copy:

aws rds create-db-snapshot --db-instance-identifier orders --db-snapshot-identifier orders-plain
aws rds wait db-snapshot-available --db-snapshot-identifier orders-plain

aws rds copy-db-snapshot --source-db-snapshot-identifier orders-plain \
  --target-db-snapshot-identifier orders-encrypted --kms-key-id alias/orders-rds
aws rds wait db-snapshot-available --db-snapshot-identifier orders-encrypted

aws rds restore-db-instance-from-db-snapshot --db-instance-identifier orders-v2 \
  --db-snapshot-identifier orders-encrypted --db-subnet-group-name orders-db --multi-az

Writes made after the snapshot would be lost, so the application is stopped first, or, to minimise downtime, AWS DMS replicates changes from the old instance to the new encrypted one until cutover. Once applications point at orders-v2, the old instance and its unencrypted snapshot are deleted. An SCP on rds:StorageEncrypted prevents the situation recurring.

Check yourself

How can every new EBS volume be encrypted automatically?

Show answer

Enable EBS encryption by default in each account and Region.

Exam Tips

Remember for the exam

  • RDS, Aurora and EFS encryption must be chosen at creation; encrypt existing RDS by snapshot, encrypted copy and restore.
  • To encrypt every new EBS volume, enable EBS encryption by default in each account and Region.
  • To share an encrypted snapshot, use a customer managed key shared with the other account.
  • DynamoDB is always encrypted; choose a customer managed key for control and audit.
  • S3 Bucket Keys reduce KMS request costs for SSE-KMS.
  • Pair preventive encryption controls (defaults, SCPs) with detective Config rules.