Lesson 3 of 4 Data Classification and Encryption at Rest

Encrypting EBS Volumes, RDS Databases and S3 Objects

This lesson explains how each storage service implements encryption at rest, and how to encrypt resources that were created unencrypted, a frequent exam scenario.

Learning outcomes

After completing this lesson, you will be able to:

  • Enable EBS encryption by default.
  • Encrypt an existing RDS database through a snapshot copy.
  • Choose S3 encryption options.

Amazon EBS

EBS encrypts volumes, their snapshots and data in transit between the instance and the volume with a KMS key. EBS encryption by default, enabled per account and Region, encrypts every new volume and snapshot copy with the default key (aws/ebs or a customer managed key you choose); it does not encrypt existing volumes. An existing unencrypted volume cannot be encrypted in place. Create a snapshot, copy it with encryption (or create a volume from the snapshot with encryption enabled), create a new volume, then stop the instance and swap the volumes, or create an encrypted AMI and relaunch. Volumes created from encrypted snapshots are always encrypted.

Amazon RDS and Aurora

RDS encryption is chosen when the DB instance or cluster is created and covers storage, automated backups, snapshots, read replicas and logs. It cannot be enabled on an existing unencrypted instance. The procedure is to take a snapshot, copy the snapshot with encryption using a KMS key, restore a new encrypted instance from the copy, and switch the application to it, accepting downtime or using replication tools to minimise it. A read replica of an encrypted instance must also be encrypted, and a cross-Region replica uses a key in the destination Region. Encrypted snapshots shared with other accounts must use a customer managed key.

aws rds create-db-snapshot --db-instance-identifier legacy-db --db-snapshot-identifier legacy-db-plain
aws rds copy-db-snapshot --source-db-snapshot-identifier legacy-db-plain \
  --target-db-snapshot-identifier legacy-db-encrypted --kms-key-id alias/rds-prod
aws rds restore-db-instance-from-db-snapshot --db-instance-identifier legacy-db-v2 \
  --db-snapshot-identifier legacy-db-encrypted --db-subnet-group-name prod-db
Put in order

Encrypting an existing RDS instance

Exam skills 4.2.2

Put the steps for encrypting an unencrypted RDS instance in order.

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

Amazon S3

S3 encrypts all new objects by default with SSE-S3 (S3 managed keys). SSE-KMS uses a KMS key, adding key policy control and CloudTrail records of key use; S3 Bucket Keys reduce KMS request costs by generating a bucket-level key, which is important for high-request buckets. DSSE-KMS applies two layers of encryption for compliance, and SSE-C uses keys supplied by the client on each request. The bucket's default encryption setting applies to new objects; existing objects keep their encryption until copied over, which S3 Batch Operations can do at scale. A bucket policy can deny uploads that do not use a specific key with the s3:x-amz-server-side-encryption-aws-kms-key-id condition.

ServiceEncrypt new resourcesEncrypt existing unencrypted resources
EBSEncryption by default per RegionSnapshot, copy encrypted, new volume, swap
RDS / AuroraChoose encryption at creationSnapshot, encrypted copy, restore, cut over
S3Default encryption (SSE-S3 always on; set SSE-KMS)Copy objects in place with Batch Operations
EFSChoose at creationCreate an encrypted file system and copy data (DataSync)
DynamoDBAlways encrypted; choose key typeSwitch between AWS owned, AWS managed and customer managed keys at any time
True or false

S3 encryption

Exam skills 4.2.2

Check facts about encryption in Amazon S3.

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

Encrypting a legacy fleet

An audit finds 120 unencrypted EBS volumes and 3 unencrypted RDS instances. The team first enables EBS encryption by default in every Region with a customer managed key so that no new unencrypted volumes appear, and adds the Config rule encrypted-volumes. For instances in Auto Scaling groups, they build an encrypted AMI and run an instance refresh. For standalone instances, an Automation runbook snapshots each volume, creates encrypted copies, and swaps volumes during a maintenance window. The RDS instances are migrated with encrypted snapshot copies and restores during planned downtime.

Check yourself

Does enabling EBS encryption by default encrypt existing volumes?

Show answer

No. It applies only to new volumes.

Exam Tips

Remember for the exam

  • EBS encryption by default applies to new volumes only.
  • Unencrypted EBS volumes and RDS instances cannot be encrypted in place: snapshot, encrypted copy, restore.
  • S3 encrypts all new objects with SSE-S3 by default; use Bucket Keys with SSE-KMS to cut KMS costs.
  • Encrypt existing S3 objects by copying them with Batch Operations.