Skip to Content
Asterrr's Handbook
5 · Data protection

RDS, DynamoDB, EFS and FSx encryption

Encryption at rest for RDS and Aurora, DynamoDB with the Database Encryption SDK, EFS and FSx, and which of them can be encrypted after creation.

Exam tasks: 5.2.1 (choose KMS options and client- vs server-side encryption), 5.2.3 (lifecycle of data at rest)

The decision: can encryption be turned on in place or only at creation, and which key do snapshots, replicas and backups use?

Encryption at rest for databases and file systems is mostly chosen at creation. The exam asks whether you can switch it on later, which key each copy uses, and how to move an unencrypted resource onto a customer managed key.

Can you encrypt what already exists?

ServiceEncrypt an existing unencrypted resource in place?How to get there
EBS volumeNoSnapshot, then create an encrypted volume from it (or copy the snapshot with encryption)
RDS / AuroraNoSnapshot, copy the snapshot with a KMS key, restore a new encrypted instance or cluster
DynamoDBAlways encryptedSwitch between AWS owned, AWS managed and customer managed keys at any time
EFSNoCreate a new encrypted file system and copy data (DataSync or AWS Backup restore)
FSx (all types)Always encryptedChoose the KMS key at creation
S3New writes onlyChange default encryption; rewrite old objects with Batch Operations
SQS, SNSYesTurn on SSE-SQS or SSE-KMS; applies to new messages
Unencrypted RDSinstanceManual snapshotCopy snapshot withcustomer managed keyRestore new encryptedinstanceCut over endpoint, deleteold instance
Diagram of can you encrypt what already exists?

Amazon RDS and Aurora

  • Encryption is chosen at creation and covers storage, automated backups, snapshots, read replicas and logs. You can't encrypt an existing unencrypted instance or change its key in place; use the snapshot-copy path.
  • Read replicas in the same Region use the same key. A cross-Region replica or snapshot copy needs a KMS key in the destination Region.
  • Sharing an encrypted snapshot works only with a customer managed key, exactly as for EBS.
  • TDE for Oracle and SQL Server is an extra, engine-level option. RDS TDE uses the RDS-managed wallet; to keep a TDE master key in your own HSM, run the database on EC2 with CloudHSM (see CloudHSM).

Amazon DynamoDB

  • Every table is encrypted at rest: tables, indexes, streams, backups and global table replicas.
  • Choose between AWS owned (default, no charge), AWS managed (aws/dynamodb) and customer managed. You can switch keys on an existing table without downtime.
  • Server-side encryption means anyone allowed dynamodb:GetItem sees plaintext. When specific attributes must stay unreadable even to people with table access, encrypt them on the client.

AWS Database Encryption SDK

  • Client-side library that encrypts and signs individual attributes before they reach DynamoDB. You choose per attribute: encrypt and sign, sign only, or leave alone.
  • Searchable encryption (beacons) lets you query encrypted attributes without decrypting the table.
  • Keys come from KMS through keyrings, including the hierarchical keyring that caches branch keys to reduce KMS calls. Use a multi-Region key when the table is a global table.

Legacy: use the AWS Database Encryption SDK instead

The DynamoDB Encryption Client is the predecessor. It is still supported for existing data, but new designs should use the Database Encryption SDK, which adds searchable encryption and signed item structure.

Table-level security is on DynamoDB security.

EFS and FSx

  • EFS: encryption at rest is set when you create the file system. Encryption in transit uses TLS through the EFS mount helper (-o tls). Enforce it with a file system policy that denies aws:SecureTransport false.
  • EFS lifecycle management moves files that aren't accessed to Infrequent Access and Archive, and back to Standard on first access. It changes cost, not encryption.
  • FSx (Windows File Server, Lustre, ONTAP, OpenZFS) always encrypts at rest with KMS. In transit: SMB 3 encryption for Windows and ONTAP SMB, Kerberos or TLS options for NFS, and Nitro-based encryption for Lustre clients on supported instances.
  • FSx for Lustre backups work only on persistent file systems that aren't linked to an S3 data repository. Scratch file systems can't be backed up.

Scenarios

Scenario
An auditor finds that a production Amazon RDS for PostgreSQL instance was created without encryption. The company must encrypt it with a customer managed KMS key while keeping downtime as short as possible and without changing the database engine. What should the security engineer do?

Further reading

On this page