AWS services such as S3, EBS, RDS and DynamoDB all advertise encryption at rest. Concretely, which threats does server-side encryption at rest remove, and which ones does it leave completely untouched?
answer
- a media control, not an access control
- transparent decrypt for allowed callers
- think stolen disk, not stolen key
- public bucket serves plaintext happily
- KMS key policy is the exception
basics
~20 sAWS at-rest encryption protects bytes on the storage media — decommissioned drives and raw copies taken outside the service API. It stops nothing at the API layer: the service decrypts transparently for any caller whose IAM and key permissions allow the read.
solid answer
~50 sServer-side encryption at rest means the service encrypts bytes before they land on disk and decrypts them on the way back out, using either its own keys or an AWS KMS key. The threats it removes are physical and out-of-band: someone recovering a decommissioned drive, a raw copy of the underlying storage, or a backup or snapshot that leaves your control. It also satisfies auditors and frameworks that require the control outright. What it does not do is add an authorization layer. If a principal is allowed `s3:GetObject` — including someone using stolen credentials, or the whole internet through a public bucket policy — the service decrypts and hands back plaintext. The one place it becomes an access control is when a customer managed KMS key is used, because the caller must then also be allowed on that key. Treat at-rest encryption as a floor and IAM as the actual gate.
go deeper
Know that AWS encrypts and decrypts for you and that your code never sees ciphertext or key material. Be able to say plainly that an encrypted bucket which is publicly readable still hands out readable files.
Explain the mechanics: the service encrypts before persisting, decrypts on read, and pulls key material from KMS or its own store. Be ready to name what the control covers — media, snapshots, backups — and what it does not.
Show you can place the control in a defence-in-depth stack: what incident it would and would not have changed, and why the KMS key policy is the only part of it that behaves like authorization. Expect a scenario asking whether encryption saved you.
Own the argument for where encryption boundaries belong at all: which datasets justify a customer managed key and the operational dependency it creates, when client-side encryption is worth its key-management cost, and how you report coverage without overclaiming what it protects.
## What "encryption at rest" means in AWS Server-side encryption at rest is a property of the storage layer, not of your application. When you write an object to S3, a block to an EBS volume, a row to an RDS instance or an item to DynamoDB, the service encrypts the bytes before they are persisted and decrypts them when they are read back. The client sends and receives plaintext; the ciphertext exists only on AWS's storage media and in the backups and snapshots derived from it. The key material comes from one of two places. Some services use keys the service manages internally, and some use AWS KMS. In the KMS case the service does not encrypt megabytes under the KMS key directly — it asks KMS for a data key, uses that to encrypt the payload, and stores the protected form of the data key alongside the data. From your side the important consequence is simply that a KMS call happens on the data path, and that call is itself authorized. The crucial word is *transparent*. There is no ciphertext to handle, no key to ship to your application, and no code change: ```bash aws s3api get-object --bucket reports --key q3.csv out.csv # S3 decrypts server-side; out.csv is plaintext, no key material touched the client ``` ## The threat model it actually addresses At-rest encryption defends against an adversary who obtains the *storage*, not an adversary who obtains a *credential*. Concretely: - **Media disposal.** A drive leaves an AWS data centre. Without encryption the residual blocks are readable; with it they are not. - **Copies that escape the service API.** A snapshot copied to another account, a database backup restored somewhere unintended, an EBS volume detached and attached to a different instance. Encryption means the copy is inert without the corresponding key permission — and for KMS-backed volumes and snapshots, that permission is a separate thing you control. - **Compliance obligations.** Many regimes and customer contracts require the control regardless of the threat, and "encrypted at rest with a customer managed key" is the checkbox they are actually asking about. ## What it does not address It does not protect against anything that arrives through the front door: - **A leaked or over-permissioned credential.** A stolen access key with `s3:GetObject` reads plaintext. The bytes being encrypted on disk is irrelevant to the API call. - **A public or over-broad resource policy.** An encrypted bucket that is publicly readable is a publicly readable bucket. This is the single most common misconception in interviews. - **Application-layer bugs.** SQL injection, a broken authorization check, an object-reference flaw — all of them run as an authorized principal. - **Compromise of the compute.** Whoever controls a running EC2 instance sees the file system in plaintext; the EBS encryption boundary is below the OS. - **Data in transit or in use.** Encryption at rest says nothing about whether the connection was TLS, and nothing about memory. Those are separate controls. ## Where it does become access control There is one real exception, and it is worth naming because it is the reason teams choose a customer managed KMS key over a service default. When the data is encrypted under a KMS key you own, reading it requires *two* authorizations: the service action (`s3:GetObject`) and the key action (`kms:Decrypt`). The key policy is evaluated on its own, so it can deny a principal that the resource policy allows. That gives you a second, independently administered lever — useful for separating duties between a data team and a security team, for making cross-account sharing explicit, and for revoking access to an entire dataset by editing one policy rather than hunting through many. ## How to talk about it The answer an interviewer is listening for has three beats: it protects the media and the copies, it is transparent to authorized callers so it is not an access control, and the KMS key policy is the part that *is* one. Saying "we encrypt everything at rest" as if it were a security posture — rather than one layer beneath least-privilege IAM, resource policies, network boundaries and logging — is what marks a weak answer. Encryption at rest is close to free and you should turn it on everywhere; just do not let it stand in for the controls that actually decide who may read the data.
- If encryption at rest doesn't stop an authorized caller, why do auditors and frameworks insist on it?Because their threat model includes the parts of the stack you do not control: physical media, disposal, and copies of backups. It is also cheap, universally available and machine-verifiable, which makes it a good baseline control to mandate. Auditors are not claiming it substitutes for access control — they check that separately, usually alongside logging and least privilege.
- Does at-rest encryption protect data while a database or Lambda function is processing it in memory?No. At-rest covers persisted bytes and in-transit covers the network; data in use is plaintext in the process's memory. If your threat model includes the host or hypervisor, that is a confidential-computing problem — on AWS, Nitro Enclaves is the isolation primitive — not something server-side encryption addresses.
- Does turning on at-rest encryption cost you latency?Effectively no on the data path — the symmetric encryption is hardware-accelerated and negligible next to storage and network time. What you actually notice is the KMS side: API calls that appear as request charges, and at very high call rates, KMS request-rate throttling that shows up as failed reads or writes rather than slow ones.
saying these in an interview costs you the question
- Says encryption at rest would have prevented a leaked access key incident
- Believes an encrypted bucket is safe to expose publicly
- Thinks the application must fetch a key and decrypt objects itself
- Treats "encrypted at rest" as a substitute for least-privilege IAM
- Assumes at-rest encryption also covers the network connection