Skip to content
intermediate Phase 7 · Cloud Security

Encryption Fundamentals

Implement encryption at rest and in transit using KMS, SSE, TLS, and ACM certificates to protect data across cloud services.

55m
0 problems
Topic Progress 0%

Encryption at Rest Options

Encryption at rest protects data stored on disk, in databases, or in object storage. AWS offers multiple encryption options depending on the service.

SSE-S3 (Server-Side Encryption with S3-Managed Keys) encrypts objects using AES-256 with keys managed entirely by S3. It is the simplest option with no configuration required. Each object is encrypted with a unique key, and the key itself is encrypted with a master key that rotates regularly.

SSE-KMS (Server-Side Encryption with KMS-Managed Keys) uses AWS KMS to manage encryption keys. You control the key policy, enabling key rotation, key disabling, and CloudTrail logging of key usage. For example, a healthcare company encrypting patient data uses SSE-KMS with a key policy allowing only the data team to decrypt, providing an audit trail of all data access.

SSE-C (Server-Side Encryption with Customer-Provided Keys) lets you supply your own encryption key with each PUT request. AWS does not store the key; you manage it entirely. Use this when you need full key control and cannot use AWS-managed keys.

Client-Side Encryption encrypts data before sending it to AWS. The application encrypts the data locally, uploads the ciphertext, and decrypts locally after download. This provides end-to-end encryption where AWS never sees plaintext data.

EBS Encryption encrypts EBS volumes using KMS keys. Encrypted volumes are automatically decrypted when attached to an instance and re-encrypted when snapshotted. Enable default EBS encryption at the account level to ensure all new volumes are encrypted.

RDS Encryption encrypts database storage, backups, and read replicas using KMS. Enabling encryption on an existing unencrypted database requires creating an encrypted snapshot and restoring from it.

Encryption in Transit

Encryption in transit protects data moving between clients and AWS services, or between services within AWS. TLS (Transport Layer Security) is the standard protocol for encrypting data in transit.

HTTPS ensures all communication between clients and AWS services is encrypted. Most AWS services support HTTPS endpoints by default. For example, S3 bucket access via https://my-bucket.s3.amazonaws.com encrypts all data in transit.

AWS Certificate Manager (ACM) provisions, manages, and deploys SSL/TLS certificates at no cost. ACM certificates integrate with ALBs, CloudFront, API Gateway, and Elastic Load Balancing. For example, request a certificate for example.com, validate domain ownership via email or DNS, and attach the certificate to an ALB for HTTPS traffic.

ACM Private Certificate Authority issues private certificates for internal services that do not need public trust. Use private certificates for mTLS (mutual TLS) between microservices, where both client and server present certificates.

VPC Endpoints keep traffic within the AWS network. Without VPC endpoints, S3 and DynamoDB traffic traverses the public internet. With VPC gateway or interface endpoints, traffic stays within the AWS backbone, reducing latency and improving security.

Network-Level Encryption: For protocols that do not support TLS natively, use IPSec VPN or AWS PrivateLink to encrypt traffic. IPSec encrypts all IP traffic between your on-premises network and AWS VPC.

Envelope Encryption and Data Classification

Envelope encryption is a two-layer encryption approach that balances security and performance. It is fundamental to how AWS KMS works.

In envelope encryption, data is encrypted with a data encryption key (DEK), and the DEK itself is encrypted with a key encryption key (KEK) stored in KMS. Only the encrypted DEK is stored alongside the data; the plaintext DEK is discarded.

For example, when you upload an encrypted file to S3 with SSE-KMS, S3 requests a DEK from KMS. KMS encrypts the DEK with your KMS master key and returns the encrypted DEK. S3 encrypts the data with the plaintext DEK, stores the encrypted DEK alongside the ciphertext, and discards the plaintext DEK. To decrypt, S3 sends the encrypted DEK to KMS, which decrypts it and returns the plaintext DEK.

Envelope encryption is efficient because the same DEK can encrypt large amounts of data, and only one KMS call is needed per DEK operation instead of per data block.

Data Classification determines which encryption approach to use:

  • Public data: No encryption required, but encryption in transit is still recommended
  • Internal data: SSE-S3 or SSE-KMS with basic key policies
  • Confidential data: SSE-KMS with restricted key policies and CloudTrail logging
  • Highly confidential data: SSE-KMS with dedicated keys, client-side encryption, and strict access controls

A financial institution classifies customer PII as highly confidential, using client-side encryption before upload plus SSE-KMS for defense in depth.

Quiz

1. What is the difference between SSE-S3 and SSE-KMS?

Question 1 options

2. What does ACM provide?

Question 2 options

3. How does envelope encryption work?

Question 3 options

4. How do you enable encryption on an existing unencrypted RDS database?

Question 4 options

5. What is the benefit of VPC endpoints for encryption?

Question 5 options

Flashcards

Question

SSE-S3

Answer

Server-side encryption using AES-256 with keys managed entirely by S3. Simplest option, no configuration required.

Question

SSE-KMS

Answer

Server-side encryption using KMS-managed keys. Provides key policies, rotation, and CloudTrail audit logging for key usage.

Question

Envelope Encryption

Answer

Data encrypted with a DEK, DEK encrypted with a KEK in KMS. Plaintext DEK is discarded. Efficient for large data volumes.

Question

AWS Certificate Manager

Answer

Provisions, manages, and deploys SSL/TLS certificates at no cost. Integrates with ALBs, CloudFront, and API Gateway.

Question

VPC Endpoints

Answer

Keep traffic within the AWS network instead of traversing the public internet. Improves security and reduces latency.

Revision Notes

Key Takeaways

  • 1. SSE-S3 = S3-managed keys, simplest. SSE-KMS = KMS-managed keys with audit trail. SSE-C = customer-provided keys
  • 2. ACM provides free SSL/TLS certificates for ALBs, CloudFront, API Gateway
  • 3. Envelope encryption: data encrypted with DEK, DEK encrypted with KMS KEK
  • 4. VPC endpoints keep traffic within AWS network for security and performance
  • 5. Classify data to determine encryption requirements: public, internal, confidential, highly confidential
  • 6. Encrypt existing RDS databases by creating encrypted snapshots and restoring

Interview Tips

  • Explain the three SSE options for S3 and when to use each
  • Describe envelope encryption and why it is efficient
  • Discuss how ACM simplifies certificate management
  • Explain data classification levels and corresponding encryption approaches
  • Compare client-side vs server-side encryption tradeoffs

Cheat Sheet

SSE-S3 = S3-managed AES-256. SSE-KMS = KMS-managed keys + audit. SSE-C = customer-provided keys. Client-side = encrypt before upload. Envelope = DEK + KEK in KMS. ACM = free SSL/TLS certs. VPC endpoints = AWS backbone traffic. RDS encryption = encrypted snapshot + restore.