Skip to main content
This lesson demonstrates how to use AWS Key Management Service (KMS) for server-side encryption with Amazon S3 and Amazon EBS. Follow these steps to:
  • Create a customer-managed KMS key.
  • Configure an S3 bucket to use SSE-KMS.
  • Create an encrypted EBS volume with the same KMS key.
  • Review key operational and exam-focused points.

1) Create a customer-managed KMS key

Open the AWS Key Management Service (KMS) console and choose Customer managed keys → Create key. Steps (high level):
  • Choose a symmetric key (the typical choice for encrypt/decrypt operations).
  • For Key usage choose Encrypt and decrypt.
  • Add an alias (for example: demo-encryption-key) and an optional description.
  • Define key administrators (add the IAM user(s) who will manage the key).
  • For key usage permissions you can keep the default policy for this demo—tighten it in production.
AWS creates a key policy when the key is created. A trimmed example of the default-style policy looks like this:
KMS key policies determine who can manage and use a key. The default policy is often sufficient for demos, but in production you should restrict permissions according to least privilege and include only the required IAM principals and actions.
A screenshot of the AWS Management Console showing a KMS customer-managed key details page with the "Key policy" tab selected. The page displays sections for key policy and key administrators, plus buttons like "Switch to policy view," "Add," and "Remove."

2) Configure an S3 bucket to use SSE-KMS

Create a new S3 bucket in the Amazon S3 console and enable SSE-KMS as the default encryption method. Steps:
  • Choose a Region (demo uses us-east-2).
  • Provide a globally unique bucket name, e.g., eden-geeking-encrypt-test-bucket.
  • Under Default encryption choose Server-side encryption with AWS Key Management Service (SSE-KMS).
  • Select the KMS key you created (demo-encryption-key) or paste its ARN.
  • Optionally enable the S3 Bucket Key to reduce request costs for SSE-KMS.
Ensure the KMS key policy and any relevant IAM policies allow the principals who will upload and access objects to call the necessary KMS actions (for example kms:GenerateDataKey and kms:Decrypt). Without those permissions, S3 operations that use SSE-KMS will fail.
After creation, verify the bucket’s Default encryption under Properties → Default encryption. It should show SSE-KMS and the KMS key ARN.
Screenshot of the AWS S3 "Create bucket" console showing an AWS KMS key ARN selected and the "Bucket Key" option set to Enable. The Advanced settings section is collapsed and the account "CloudWithDjango-Org" is visible in the top bar.
You can confirm the KMS key ARN used for the bucket’s default encryption, for example:

3) Create an encrypted EBS volume using KMS

To create an encrypted EBS volume that uses the same customer-managed KMS key:
  • Open the EC2 console → Volumes → Create volume.
  • Select the Volume type (e.g., General Purpose SSD).
  • Set Size, IOPS, Throughput as needed (defaults are fine for the demo).
  • Choose an Availability Zone (e.g., us-east-2a).
  • Check Encrypt this volume.
  • In the KMS key selector choose the demo-encryption-key.
When using a customer-managed KMS key for EBS, confirm the key policy allows the EC2/EBS service and the IAM principal creating or attaching the volume to use the key. The console often adds necessary service permissions automatically for keys created in the same account. For cross-account or automated setups, add explicit permissions as needed.
Once the volume is created, EBS encryption at rest will be enabled and any snapshots created from that volume will also be encrypted. Refresh the Volumes listing to see the encryption status and associated KMS key alias/ID.
A screenshot of the AWS EC2 “Create volume” page showing volume settings (Size, IOPS set to 3000, Throughput 125 MiB/s) and the Availability Zone set to use2-az1. The browser tab shows the us-east-2 AWS console for a CloudWithDjango-Org account.
A screenshot of the AWS EC2 "Volumes" console showing two EBS volumes with columns for encryption, KMS key ID/alias and status. One volume is marked encrypted (demo-encryption-key) and the other is not encrypted.

4) Summary and exam/operational checklist

Key takeaways:
  • Encryption protects data at rest. Use KMS for centralized key management and auditing.
  • Amazon S3 supports server-side encryption including SSE-KMS (KMS-managed keys).
  • EBS volumes can be encrypted with KMS; snapshots of encrypted volumes remain encrypted.
  • KMS key policies and IAM policies together control who can use and manage keys—apply least privilege in production.
Quick checklist for exams and production: Links and further reading: That completes this lesson on using KMS with S3 and EBS for server-side encryption.

Watch Video

Practice Lab