Skip to Content
Asterrr's Handbook
3 · Infrastructure security

DynamoDB Encryption

Server-side encryption at rest versus client-side attribute encryption with the AWS Database Encryption SDK.

The decision: is table-wide server-side encryption enough, or must chosen attributes stay unreadable even to AWS?

DynamoDB has two separate encryption layers. Server-side encryption is always on and covers the whole table. Client-side encryption is optional, runs in your application, and keeps chosen attributes unreadable even to AWS.

plaintext itemdata keyencrypted attributesencrypt at restApplicationDatabaseEncryption SDKKMS key(wrapping)DynamoDB tableKMS key (tableSSE)
Client-side encryption protects selected attributes before they leave the application. Server-side encryption then encrypts everything the table stores.

Comparison

ItemServer-side encryption at restClient-side (Database Encryption SDK)
WhereInside DynamoDBIn your application, before the write
ScopeAll table data, indexes, streams, global tables, backups and DAXOnly the attributes you mark. Table name, partition key and sort key stay plaintext
Can be turned offNo. Always onIt is optional
Who can read plaintextDynamoDB decrypts transparently for authorized callersOnly holders of the key. AWS and third parties cannot
KeysKMS. AWS owned key (default, free), AWS managed key, or customer managed keyKMS, CloudHSM, or any key source through keyrings
IntegrityNot applicableRecords are signed, so tampering such as adding fields or swapping encrypted values is detected
Switching keysYou can switch between the three key types at any timeUpdate the cryptographic actions in your configuration

Key points about the SDK.

  • Each field is marked encrypt-and-sign, sign-only, or do nothing. Keys must stay readable because DynamoDB needs them to find items.
  • Supports searchable encryption for exact match queries on encrypted data, and a hierarchical keyring that caches key material to cut KMS calls.
  • Data in transit uses HTTPS. Server-side keys cost nothing when AWS owned. AWS managed and customer managed keys incur KMS charges.

Legacy

The DynamoDB Encryption Client was renamed the AWS Database Encryption SDK. Older exam text still uses the old name.

Exam signal

"AWS must never be able to read the value of a specific attribute" means client-side encryption. "Audit every use of the table key and control who can use it" means a customer managed KMS key for server-side encryption.

Exam trap

You cannot disable DynamoDB encryption at rest, and you cannot encrypt a primary key attribute with the client-side library. An answer that "enables encryption" on the table is already true by default.

Further reading

On this page