S3 encryption options
SSE-S3, SSE-KMS, DSSE-KMS, SSE-C and client-side encryption, with the bucket policy tricks that enforce them.
Exam tasks: 5.2.1 (client- vs server-side encryption)
The decision: for this bucket, which key encrypts objects, who can use it, and how do you enforce that choice on every upload?
Since 5 January 2023 every new S3 object is encrypted at rest with SSE-S3 at no cost, so "encrypted at rest" is the baseline. The exam asks which option adds the control you need.
Which one to use
| SSE-S3 | SSE-KMS | DSSE-KMS | SSE-C | Client-side | |
|---|---|---|---|---|---|
| Keys held by | S3 | KMS (managed or customer managed key) | KMS | Caller, sent on every request | Your application or KMS via an SDK |
| Layers | One | One | Two independent layers | One | Whatever you apply |
| Request header | AES256 | aws:kms plus optional key ID header | aws:kms:dsse | customer-algorithm, customer-key, customer-key-MD5 | none |
| Needs a KMS permission to read | No | Yes | Yes | No | Depends |
| Key use in CloudTrail | No | Yes | Yes | No | If KMS is used |
| Status on new buckets | Default for every object | Opt-in default or per request | Opt-in | Blocked by default since April 2026 | Not visible to S3 |
| Good fit | Baseline | Separation of duties, revocation, audit | Rules that name dual-layer encryption | Legacy apps that already manage keys | S3 must never see plaintext |
- SSE-C. S3 does not store the key, so a lost key means lost data. HTTPS is mandatory and the key is AES-256. SSE-C is blocked by default on new general purpose buckets (and on existing buckets without SSE-C data, in most Regions) since April 2026. Allow it deliberately by setting
BlockedEncryptionTypestoNONEin the bucket encryption configuration. Requests on a blocked bucket get403 AccessDenied. - SSE-KMS. The caller needs
kms:GenerateDataKeyto upload andkms:Decryptto read, in addition to S3 permissions. Heavy request rates can hit KMS request quotas, and S3 Bucket Keys cut the calls. - Default encryption. The bucket default can be SSE-S3, SSE-KMS or DSSE-KMS. It applies only to new writes. Existing objects keep their encryption until rewritten, for example with an S3 Batch Operations copy.
- Client-side. Use the Amazon S3 Encryption Client or the AWS Encryption SDK with a KMS key. You manage keys and decryption.
Exam signal
"Audit who decrypted each object" or "revoke access by disabling the key" means SSE-KMS. "Customer supplies and holds the key, AWS stores nothing" means SSE-C. "Encrypt before it leaves the application" means client-side.
S3 Bucket Keys
- S3 asks KMS for a short-lived bucket-level key and derives object data keys from it, cutting KMS requests by
up to 99%. Fixes both KMS cost and
ThrottlingExceptionon busy buckets. - The encryption context changes from the object ARN to the bucket ARN. Key policies or grants that condition
on
aws:s3:arnfor individual objects need updating, and CloudTrail shows fewer, bucket-level events.
Enforcing encryption
| Goal | How |
|---|---|
| Reject unencrypted uploads | Bucket policy deny when s3:x-amz-server-side-encryption is absent |
| Require SSE-KMS | Deny unless header equals aws:kms |
| Require TLS | Deny when aws:SecureTransport is false |
| Detect drift | AWS Config rule s3-default-encryption-kms, S3 Storage Lens encrypted-bytes metrics |
| Block SSE-C | Leave the new default, or set it through PutBucketEncryption |
Enforcing a specific key
Because every object is encrypted anyway, the modern question is "encrypted with which key?"
{
"Sid": "OnlyTheLedgerKey",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::ledger-exports-5520/*",
"Condition": {
"StringNotEqualsIfExists": {
"s3:x-amz-server-side-encryption-aws-kms-key-id": "arn:aws:kms:eu-west-1:210987654321:key/7c1e9f0a-example"
}
}
}- Pair it with default encryption set to SSE-KMS with that key, so uploads that send no headers still land on the right key.
- A deny on
s3:x-amz-server-side-encryptionbeingNullrejects every upload that relies on default encryption. That is usually more disruptive than needed.
SSE-KMS permissions that catch people out
| Operation | KMS permissions on the key |
|---|---|
PutObject | kms:GenerateDataKey |
GetObject, CopyObject source | kms:Decrypt |
| Multipart upload | kms:GenerateDataKey and kms:Decrypt (S3 decrypts the data key to finish the upload) |
| Replication to an SSE-KMS destination | Replication role: kms:Decrypt on the source key, kms:Encrypt on the destination key |
| Cross-account read | Bucket policy and key policy must both allow the other account |
Big uploads fail, small ones work
The AWS CLI switches to multipart upload for large files. A role with only kms:GenerateDataKey can upload small
objects to an SSE-KMS bucket but gets AccessDenied on large ones. Add kms:Decrypt on the key; changing the
bucket policy doesn't help.
Exam trap
A cross-account reader with S3 access still fails on SSE-KMS objects unless the key policy and their IAM policy allow kms:Decrypt. Using the aws/s3 AWS managed key blocks cross-account sharing completely.
Scenarios
Large files go through multipart upload, and completing it needs kms:Decrypt on the key. Bucket Keys reduce KMS calls but don't change which permissions are required. ACL permissions are unrelated. Switching to SSE-S3 would work but abandons the customer managed key that the company chose for control.
Related
- Protecting S3 buckets and data
- KMS keys and envelope encryption
- KMS key policy, IAM and grants
- Large uploads to SSE-KMS buckets
Further reading
Inter-resource encryption in transit
Nitro hardware encryption, VPC Encryption Controls, EMR TLS, EKS pod traffic and SageMaker distributed training.
Protecting S3 buckets and data
Bucket policy controls, VPC endpoints, TLS enforcement, MFA conditions, versioning, Object Lock, lifecycle retention and data event logging.