AWS KMS Architecture: Enterprise Encryption Strategy & Key Management

AWS KMS Architecture: Enterprise Encryption Strategy & Key Management

November 16, 2025

The AWS KMS System Has Three Pieces of Hardware

To protect your terabytes of data quickly and securely, AWS uses a key hierarchy with three components, each serving a distinct, crucial role.

Here is how the KMS key hierarchy breaks down in simple terms:

  • The KMS Master Key (KMSK) – The Vault Key
    Location: Locked inside the AWS HSM (the secure vault).
    Purpose: Encrypts the data keys. It never touches your application data directly.
  • The Plaintext Data Key (DKP) – The Small, Fast Safe Key
    Location: Temporarily in your application's memory.
    Purpose: Encrypts and decrypts your data quickly. It is used for bulk operations and then destroyed.
  • The Encrypted Data Key (DKE) – The Locked Safe
    Location: Stored alongside your encrypted data (for example, in S3 object metadata or a database column).
    Purpose: A secure, encrypted copy of the fast key. It lets you later recover DKP without re-encrypting all your data.

The Encryption Flow: Locking the Data

Imagine you have a huge, sensitive document (your data) that needs to be sealed and stored.

Step 1: Request the Key Material

Your application sends a request to AWS KMS: "Hey Vault, please give me a new key to encrypt this document using Master Key X."

  • The Vault (KMS) uses its secure Master Key (KMSK) to generate two things:
  • A unique, temporary Plaintext Data Key (DKP).
  • An encrypted version of that key, the Encrypted Data Key (DKE).

Step 2: Local Encryption and Immediate Cleanup

The Vault returns both the plaintext and encrypted versions of the key over a secure TLS channel.

  • DKP is used locally to encrypt the data quickly and efficiently.
  • Once encryption is done, DKP is immediately wiped from memory.

Step 3: Storing the Secure Blob

You now have encrypted data and its corresponding encrypted key.

  • DKE is stored right next to the encrypted data (for example, in S3 metadata or a database column).

Together, they form a self-contained encrypted blob.


The Decryption Flow: Unlocking the Data

A week later, you need to decrypt the document.

  • Your application retrieves the encrypted data and DKE.
  • Your application sends only DKE to KMS using a Decrypt request.
  • KMS checks IAM permissions, and if authorized, decrypts DKE using KMSK.
  • KMS returns DKP, which is used to decrypt the data locally and then destroyed.

The Ultimate KMS Question: Why Two Keys?

This design solves two critical requirements at the same time:

1. The Need for Speed (Why DKP Exists)

  • Problem: The KMS Master Key lives inside slow, heavily audited hardware (an HSM). Encrypting a 10 GB file directly with it would be slow, expensive, and rate-limited.
  • Solution: DKP is a fast, lightweight AES-256 key that can encrypt gigabytes of data locally without additional KMS calls.

2. The Need for Persistence and Security (Why DKE Exists)

  • Problem: DKP must be destroyed after use. But you still need a way to recover it later.
  • Solution: DKE is the encrypted, persistent version of the fast key. Even if an attacker steals both the encrypted data and DKE, they cannot decrypt anything without access to the Master Key in KMS.

The KMS Master Key is the security policy; the Data Key (DKP) is the fast, disposable tool that enforces it.


Next Step: Secure Your Decryption

Now that you understand the keys, the next crucial step is mastering Encryption Context — the hidden metadata that adds an additional layer of protection on top of IAM to your KMS operations.


  • Eclipsos Corp.
  • Empowering Innovation Through Cloud

Need Help with Your Project?

Contact our experts for personalized assistance with your cloud and software development needs.