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?
| Service | Encrypt an existing unencrypted resource in place? | How to get there |
|---|---|---|
| EBS volume | No | Snapshot, then create an encrypted volume from it (or copy the snapshot with encryption) |
| RDS / Aurora | No | Snapshot, copy the snapshot with a KMS key, restore a new encrypted instance or cluster |
| DynamoDB | Always encrypted | Switch between AWS owned, AWS managed and customer managed keys at any time |
| EFS | No | Create a new encrypted file system and copy data (DataSync or AWS Backup restore) |
| FSx (all types) | Always encrypted | Choose the KMS key at creation |
| S3 | New writes only | Change default encryption; rewrite old objects with Batch Operations |
| SQS, SNS | Yes | Turn on SSE-SQS or SSE-KMS; applies to new messages |
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:GetItemsees 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 deniesaws:SecureTransportfalse. - 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
RDS can't encrypt an existing instance in place, and a read replica of an unencrypted instance can't be encrypted. The supported path is snapshot, encrypted copy, restore, cut over. EBS encryption by default doesn't apply to RDS storage, and rebooting changes nothing.
Related
Further reading
EBS encryption and lost KMS keys
How EBS uses KMS data keys and grants, encryption by default, snapshot rules, and what to do when the key is scheduled for deletion.
Immutable storage and Vault Lock
Compare S3 Object Lock, AWS Backup Vault Lock and Amazon Glacier Vault Lock for WORM retention and ransomware-proof backups.