Skip to Content

Encryption

S3 server-side encryption with SSE-S3, SSE-KMS, DSSE-KMS and SSE-C, KMS quotas and Bucket Keys, client-side encryption, encryption in transit, and forcing encryption with bucket policies.

The options

S3 encryption options: server-side, S3 encrypts with SSE-S3 (a key owned by S3, on by default, header AES256), SSE-KMS (a key in AWS KMS, audited in CloudTrail, header aws:kms), DSSE-KMS (a KMS key plus an S3 key, two layers, header aws:kms:dsse) or SSE-C (the customer's key sent in the headers of every request, HTTPS only); with client-side encryption the client encrypts before upload and S3 stores only encrypted bytes S3 encryption options: server-side, S3 encrypts with SSE-S3 (a key owned by S3, on by default, header AES256), SSE-KMS (a key in AWS KMS, audited in CloudTrail, header aws:kms), DSSE-KMS (a KMS key plus an S3 key, two layers, header aws:kms:dsse) or SSE-C (the customer's key sent in the headers of every request, HTTPS only); with client-side encryption the client encrypts before upload and S3 stores only encrypted bytes

Who holds the key, and who does the encrypting.

Objects in S3 can be encrypted in these ways. Knowing which one fits which situation is a common exam question.

  • Server-side encryption (SSE): S3 encrypts objects when it stores them and decrypts them when they are read.
    • SSE-S3: keys managed by Amazon S3. On by default.
    • SSE-KMS: keys in AWS KMS.
    • DSSE-KMS: two layers of encryption, one with a KMS key.
    • SSE-C: keys the customer provides with each request.
  • Client-side encryption: the client encrypts before uploading.

SSE-S3

  • Uses keys handled, managed and owned by AWS. The customer never sees or manages them.
  • The object is encrypted server-side with AES-256.
  • Request header: "x-amz-server-side-encryption": "AES256".
  • On by default for new buckets and new objects: since January 2023, every new upload is encrypted with at least SSE-S3, at no cost.

SSE-KMS

  • Uses keys managed in AWS KMS (Key Management Service): the AWS managed key aws/s3 or a customer managed key.
  • Advantages: the customer controls the key (key policy, rotation, disabling it) and every use of the key is audited in CloudTrail.
  • Request header: "x-amz-server-side-encryption": "aws:kms".
  • To read an object, a user needs permission on both the object and the KMS key.

The KMS limitation

SSE-KMS: for every upload S3 calls AWS KMS GenerateDataKey, and for every download it calls Decrypt; each call counts against the KMS request quota, and S3 Bucket Keys cut these calls by up to 99 percent SSE-KMS: for every upload S3 calls AWS KMS GenerateDataKey, and for every download it calls Decrypt; each call counts against the KMS request quota, and S3 Bucket Keys cut these calls by up to 99 percent

Every upload and download is a call to KMS.
  • Each upload makes S3 call the KMS GenerateDataKey API, and each download calls Decrypt.
  • These calls count towards the KMS requests-per-second quota: 10,000, 20,000 or 100,000 per second depending on the Region. A very busy bucket can be throttled by KMS.
  • A higher quota can be requested in the Service Quotas console.
  • S3 Bucket Keys let S3 use a short-lived bucket-level key, cutting calls to KMS (and their cost) by up to 99%.

Updated since the slides

The slides give KMS quotas of 5,500, 10,000 or 30,000 requests per second. The AWS documentation now lists 10,000, 20,000 or 100,000 depending on the Region. The exam point is unchanged: SSE-KMS at very high request rates can hit the KMS quota.

DSSE-KMS

  • Dual-layer server-side encryption: each object is encrypted twice: first with a data key from the customer's KMS key, then again with a separate key managed by S3.
  • For compliance standards that require multi-layer encryption. It costs more and adds a little latency compared with SSE-KMS.
  • Request header: "x-amz-server-side-encryption": "aws:kms:dsse".

SSE-C

  • Server-side encryption using keys fully managed by the customer, outside AWS.
  • The customer sends the key in the HTTP headers of every request; S3 uses it to encrypt or decrypt, then discards it. S3 doesn't store the key.
  • HTTPS must be used.
  • If the key is lost, the data is lost.

Updated since the slides

Since April 2026, SSE-C is disabled by default for new buckets (and existing buckets in accounts with no SSE-C objects). To use it, it must be explicitly allowed in the bucket's default encryption settings.

Client-side encryption

  • The client encrypts data itself before sending it to S3, using a library such as the Amazon S3 Encryption Client.
  • The client decrypts it after downloading.
  • The customer fully manages the keys and the encryption cycle. S3 only ever stores encrypted bytes.

Encryption in transit

  • Encryption in flight uses TLS (often still called SSL).
  • S3 has an HTTP endpoint (not encrypted) and an HTTPS endpoint (encrypted in flight).
  • HTTPS is recommended, and most clients use it by default. HTTPS is mandatory for SSE-C.

Forcing encryption in transit

A bucket policy can refuse any request that doesn't use HTTPS, with the aws:SecureTransport condition:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Deny",
      "Principal": "*",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::my-bucket/*",
      "Condition": { "Bool": { "aws:SecureTransport": "false" } }
    }
  ]
}

Requests over plain HTTP are denied; HTTPS requests go through.

Default encryption vs bucket policies

  • Default encryption (SSE-S3 unless SSE-KMS or DSSE-KMS is chosen) is applied automatically to new objects that don't ask for anything else.
  • To force a particular kind, use a bucket policy that denies s3:PutObject without the right header, for example "StringNotEquals": {"s3:x-amz-server-side-encryption": "aws:kms"}, or without SSE-C headers.
  • Bucket policies are evaluated before default encryption. A denied upload never reaches the default encryption step.

Real-world examples

  • A startup relies on default SSE-S3: every object is encrypted with no work or cost.
  • A bank must control and audit its keys. It uses SSE-KMS with a customer managed key and turns on S3 Bucket Keys to keep KMS costs down.
  • A defence contractor must meet a rule requiring two layers of encryption. It uses DSSE-KMS.
  • A company with its own key management system keeps keys outside AWS: SSE-C, or client-side encryption.

Exam tips

  • "Encryption with no management at all" → SSE-S3 (already on by default).
  • "Control the key", "audit key usage", "rotate keys" → SSE-KMS.
  • "KMS throttling errors on a busy bucket" → S3 Bucket Keys, or ask for a higher KMS quota.
  • "Two layers of encryption for compliance" → DSSE-KMS.
  • "Keys must stay outside AWS, S3 does the encryption" → SSE-C (HTTPS only).
  • "Data must be encrypted before it leaves our servers" → client-side encryption.
  • "Refuse uploads over HTTP" → bucket policy denying when aws:SecureTransport is false.
  • "Only allow objects encrypted with SSE-KMS" → bucket policy denying PutObject without the aws:kms header.

Common traps

  • "S3 objects aren't encrypted unless you turn it on." SSE-S3 is on by default.
  • "S3 stores the SSE-C key for later." It never stores it; the key is sent every time.
  • "SSE-KMS has no effect on performance." KMS calls count against a quota and can throttle.
  • "Default encryption overrides a bucket policy." The policy is evaluated first.

Hands-on lab: SSE-KMS and forcing HTTPS

Goal: upload an object with SSE-KMS, and deny plain-HTTP requests with a bucket policy.

Costs money

Using the AWS managed key aws/s3 has no monthly key charge; a few KMS requests cost less than a cent. Any Region works.

Upload with SSE-KMS

In your lab bucket, Upload a file. Under Properties → Server-side encryption, choose Specify an encryption key → SSE-KMS → AWS managed key (aws/s3). Upload, then open the object: encryption shows SSE-KMS and the key ARN.

Change the default encryption

Properties → Default encryption → Edit: choose SSE-KMS with aws/s3 and Bucket Key: Enable. New uploads are now encrypted with KMS automatically.

Deny HTTP

Add the aws:SecureTransport bucket policy above, with your bucket name. In CloudShell:

aws s3 cp s3://<your-bucket>/<your-file> . --endpoint-url http://s3.us-east-1.amazonaws.com
aws s3 cp s3://<your-bucket>/<your-file> .

The first command (HTTP) fails with Access Denied; the second (HTTPS, the default) works.

Expected result: objects encrypted with KMS by default, and plain-HTTP requests refused.

Clean up: delete the bucket policy, set default encryption back to SSE-S3, and delete the test object.

AWS documentation

On this page

Open notes

Spotted a mistake?

These notes are open source. Suggest a fix, or star the repo if they helped you.

Suggest an edit

For AI agents: llms.txt · llms-full.txt