Data Protection · Topic 5 of 7

Storage and Database Encryption

Compare S3 SSE-S3, SSE-KMS, DSSE-KMS and SSE-C, and encrypt EBS, EFS, RDS and DynamoDB at rest, including how to encrypt an existing database.

  • 6 min
In a nutshell
  • All new S3 objects get SSE-S3 by default. Use SSE-KMS for key control and audit.
  • S3 Bucket Keys reduce KMS requests and cost for SSE-KMS.
  • Enforce encryption with bucket policy conditions on s3:x-amz-server-side-encryption, and combine with default bucket encryption.

What it is

Encryption at rest protects stored data if disks, snapshots or backups are accessed by someone who should not have them. AWS services handle the mechanics, and your job is to choose the key model, enforce it, and avoid the special cases that break it.

The exam asks which encryption option fits a requirement for control, audit, cost or compliance.

Write dataS3, EBS, RDSServicecalls KMS for a data keyEncrypted at restciphertext on diskReadKMS authorises decrypt

How it works

Amazon S3

OptionKey held byUse it when
SSE-S3S3 managed keysDefault protection with no key management, applied to all new objects automatically
SSE-KMSKMS key (AWS managed or customer managed)You need key policy control, audit in CloudTrail and the ability to disable access
DSSE-KMSKMS key, two layers of encryptionA requirement for dual layer encryption
SSE-CCustomer supplied key sent with each requestYou must hold the key outside AWS, and accept managing it per request
Client side encryptionYour applicationData must be encrypted before it reaches AWS

All new objects are encrypted at rest with SSE-S3 by default. For SSE-KMS, set the bucket default encryption to a KMS key, and use an S3 Bucket Key to cut the number of calls to KMS, which lowers cost and avoids request limits on busy buckets.

To enforce a particular method, write a bucket policy that denies uploads without it.

{
  "Version": "2012-10-17",
  "Statement": [{
    "Sid": "RequireKmsEncryption",
    "Effect": "Deny",
    "Principal": "*",
    "Action": "s3:PutObject",
    "Resource": "arn:aws:s3:::amzn-s3-demo-bucket/*",
    "Condition": { "StringNotEquals": { "s3:x-amz-server-side-encryption": "aws:kms" } }
  }]
}

Requests that omit the header are also denied by this policy, so clients must send it. Principals that read SSE-KMS objects need kms:Decrypt on the key, and writers need kms:GenerateDataKey. A missing KMS permission appears as AccessDenied on the S3 call.

Protecting S3 data from change

FeaturePurpose
VersioningKeeps prior versions so deletes and overwrites are recoverable
MFA deleteRequires MFA to permanently delete a version or change versioning
Object LockWrite once read many retention, in governance or compliance mode, plus legal hold
ReplicationCopies objects to another bucket, Region or account

Compliance mode cannot be shortened or removed by anyone, including the root user, until retention ends. Governance mode lets users with special permission override it.

Amazon EBS

Enable EBS encryption by default per Region so that every new volume is encrypted. Snapshots of encrypted volumes are encrypted, and volumes created from them are too. Encryption affects performance only slightly, and covers data at rest, data moving between the instance and the volume, and snapshots.

An existing unencrypted volume cannot be encrypted in place. Snapshot it, copy the snapshot with encryption enabled, and create a new volume from the copy.

Amazon RDS and Aurora

Encryption is chosen when you create the DB instance or cluster, and covers storage, automated backups, snapshots and read replicas. You cannot turn it on for an existing unencrypted instance directly. The fix is to take a snapshot, copy it with encryption, and restore a new instance from the copy.

# AWS CLI: copy an unencrypted RDS snapshot as an encrypted one
aws rds copy-db-snapshot \
  --source-db-snapshot-identifier mydb-snap \
  --target-db-snapshot-identifier mydb-snap-enc \
  --kms-key-id alias/app-data

Read replicas of an encrypted instance are encrypted. To share an encrypted snapshot with another account, it must use a customer managed key that the other account can use. For database engines that offer Transparent Data Encryption (TDE), such as Oracle and SQL Server, TDE is an additional database level option.

Other services

  • DynamoDB. All tables are encrypted at rest. You choose an AWS owned key, an AWS managed key or a customer managed key.
  • Amazon EFS. Choose encryption at creation. It cannot be turned on later for an existing file system, so create a new one and copy the data.
  • Amazon Redshift. Encrypt clusters with a KMS key.
  • AWS Backup. Recovery points are stored in a vault that is encrypted with a KMS key, and they can be copied across accounts and Regions.
  • Amazon SQS and SNS. Use server side encryption with KMS for the queues and topics.

Choosing a key model

NeedChoose
Least effort, default protectionAWS owned or SSE-S3
Audit of every use and the ability to disable accessCustomer managed KMS key
Share encrypted data across accountsCustomer managed KMS key
Reduce KMS cost on high volume S3SSE-KMS with S3 Bucket Keys
Keys fully outside AWSSSE-C or client side encryption

What to remember for the exam

  • All new S3 objects get SSE-S3 by default. Use SSE-KMS for key control and audit.
  • S3 Bucket Keys reduce KMS requests and cost for SSE-KMS.
  • Enforce encryption with bucket policy conditions on s3:x-amz-server-side-encryption, and combine with default bucket encryption.
  • EBS encryption by default is per Region and covers new volumes only.
  • RDS and EFS encryption is chosen at creation. To encrypt an existing database, copy a snapshot with encryption and restore from it.
  • Snapshots encrypted with the AWS managed key cannot be shared, so use a customer managed key.
  • Object Lock compliance mode cannot be bypassed during retention, and governance mode can be overridden with permission.
  • DynamoDB is always encrypted, and you choose the key type.
Exam tip

For "encrypt an existing unencrypted RDS instance with minimal downtime", the standard path is snapshot, encrypted copy, restore, and cut over.

Common mistakes

Believing SSE-S3 gives audit and access control by key. It cannot be disabled or audited per use as KMS can.

Forgetting KMS permissions on the reader. A user with S3 access but no kms:Decrypt gets AccessDenied.

Trying to encrypt an existing volume in place. It requires a snapshot and copy.

Sharing a snapshot encrypted with the AWS managed key. It is not shareable, so re-encrypt it with a customer managed key.

Watch out

Disabling or deleting the KMS key used for a bucket or database makes the data unreadable until the key is back, so protect these keys with restricted deletion and alarms.

Check yourself

  • How do you encrypt an existing unencrypted RDS instance?

    Snapshot it, copy the snapshot with encryption enabled, and restore a new instance from the encrypted copy.

  • What do S3 Bucket Keys reduce?

    The number of requests to KMS for SSE-KMS, which lowers cost and the risk of throttling.

  • What is the difference between Object Lock governance and compliance mode?

    Governance mode can be bypassed by users with special permission, while compliance mode cannot be shortened or removed until the retention ends.

Topic 5 of 7 in Data Protection

Test yourself on Data Protection

The full AWS SCS-C03 question bank has 858 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by AWS. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.