Who can decrypt this data?
Choose the least-operational key that meets the control need, then trace envelope encryption and every authorization side without locking out recovery.
LESSON GOALS
By the end, you can
- Choose AWS owned, AWS managed, customer managed, or dedicated-HSM keys from the required control boundary.
- Explain envelope encryption and trace key policy, IAM, and data-service authorization for same-account and cross-account use.
01
Start with the control boundary
“Encrypt it with KMS” is not a complete design. First name the data service, key owner, administrators, users, accounts, Regions, audit need, revocation need, and recovery path.
AWS owned keys require the least customer operation and offer the least customer control. AWS managed keys are visible in your account, but the AWS service controls their policy and lifecycle.
Customer managed KMS keys add customer-controlled policy, audit, disablement, deletion scheduling, rotation choices, and cross-account use. That control also adds cost, quotas, and lockout risk.
AWS CloudHSM fits an explicit need for dedicated HSM control. It is not the default upgrade for “stronger encryption”; it carries much more operation.
Choose the least-operational key type that still meets audit, revocation, tenancy, integration, and recovery requirements.
Separate key administrators from data users. One role can maintain policy and lifecycle without Decrypt; another can use only the cryptographic operations required by the workload.
02
Use envelope encryption for the data
Envelope encryption avoids sending large objects through KMS. The application or AWS service uses a data key to encrypt the data, then KMS protects that data key with a KMS key.
The encrypted data key can be stored beside the ciphertext. It is not useful as plaintext until an authorized KMS decrypt operation recovers the data key.
Encryption context can bind non-secret context to a cryptographic operation and policy where supported. A mismatched context can correctly prevent decryption.
KMS keys are Regional. A multi-Region key uses related key material in a primary and replicas, but each Regional key has its own policy and operational state.
Rotating eligible key material keeps the same logical key and old decrypt capability. It does not rewrite existing ciphertext. Disabling or deleting the key can make durable data unreadable.
For example, an S3 object can store ciphertext and its encrypted data key together. Reading the object still requires data access plus an authorized KMS path that can recover the data key.
03
Authorize use without losing recovery
Every KMS key has a key policy. IAM works only when the key policy directly allows the principal or delegates authority to the account's IAM policies.
Cross-account use needs both sides. The key-owning account authorizes the external principal in the key policy, and the caller account grants the required KMS action in IAM. The data policy must also allow access to the encrypted data.
Separate key administration from key use. Producers may need Encrypt or GenerateDataKey. Readers may need Decrypt. Neither role automatically needs to change policy or schedule deletion.
Keep a tested recovery administrator path that does not depend on the application role. Monitor policy changes, disablement, and deletion schedules.
A backup is not recoverable merely because its bytes exist. A restore drill must test the actual principal, key policy, IAM, data-service policy, Region, and encryption context.
Run negative tests as well as a successful decrypt. Test another prefix, a role from the wrong account, policy administration by an application role, and recovery through the independent administrator path.
DECISION TABLE
Compare the architecture constraints
| requirement | choose | because | reject |
|---|---|---|---|
| Baseline service encryption | AWS owned/default where documented | Lowest operations. | Customer key without control need. |
| Audit/revocation/cross-account | Customer managed KMS key | Customer owns policy/lifecycle. | AWS owned/managed lacking control. |
| Dedicated single-tenant HSM | CloudHSM | Hardware control decisive. | KMS when dedicated HSM mandatory. |
GUIDED WORKED SCENARIO
Reason from the stated constraints
This is a guided example, not a question to memorise. The knowledge check uses new situations to test the same reasoning.
A security account owns encryption for two producer accounts and one analytics account. Producers encrypt S3 objects; analytics decrypts one prefix. Key admins cannot read data; apps cannot alter key policy.
Requirements
- Three-account separation.
- Customer revocation/audit.
- Analytics one prefix.
- Admins cannot use data.
- Envelope encryption.
Reasoning path
- Create customer key in required Region/account.
- Separate admin/use policy statements.
- Authorize producer encrypt and analytics decrypt with context/resource constraints.
- Add external-account IAM allows and aligned S3 policies.
- Test recovery.
Why it wins
- Supplies policy/audit/revocation.
- Both cross-account sides explicit.
- Apps lack key administration.
Why the alternatives lose
Lacks customer control.
Becomes correct when: Baseline low-ops encryption sufficient.Key policy side missing.
Becomes correct when: Same-account key policy already delegates IAM.No dedicated-HSM need; more operations.
Becomes correct when: Requirement mandates dedicated HSM.INTERACTIVE ARCHITECTURE VISUAL
Require both sides of KMS authorization
An analytics role in another account requests Decrypt. Change the key owner’s policy, caller IAM, or key state.
× Request stopsThe key-owning account has not authorized the external caller.
Read the diagram as text
Trace ciphertext and its encrypted data key to the Regional KMS key. For cross-account decrypt, check the key policy, caller-account IAM, data-service access, encryption context, and key state. Test a separate recovery path.
KNOWLEDGE CHECK
Answer one question at a time
Pass every question to complete this lesson. Each answer includes reasoning before you continue.
KEY TERMS
Glossary
- AWS KMS
- A managed service for creating and controlling cryptographic keys.
- Customer managed key
- A KMS key whose policy and lifecycle the customer controls.
- AWS managed key
- A KMS key visible to the customer but managed for an AWS service.
- AWS owned key
- A key owned and managed by AWS for supported service encryption.
- Envelope encryption
- Encrypting data with a data key and protecting that key with another key.
- Data key
- Key material used to encrypt application data.
- Key policy
- The resource policy controlling access to a KMS key.
- Encryption context
- Non-secret context authenticated with a supported cryptographic operation.
- AWS CloudHSM
- Dedicated hardware security modules operated through a managed cluster service.
PRIMARY SOURCES
Verify the claims
- primaryAWS KMS keysaws-kms-key-concepts · retrieved 2026-07-30
- primaryKey policies in AWS KMSaws-kms-key-policies · retrieved 2026-07-30
- primaryAWS Key Management Service conceptsaws-sec-kms · retrieved 2026-07-29
- primaryWhat is AWS CloudHSM?aws-cloudhsm-overview · retrieved 2026-07-30
- primaryCross account resource access in IAMaws-iam-cross-account-resource-access · retrieved 2026-07-30
- primaryRotate AWS KMS keysaws-kms-key-rotation · retrieved 2026-07-30
- primaryMulti-Region keys in AWS KMSaws-kms-multi-region-keys · retrieved 2026-07-30
- primaryKms Cross Accountaws-kms-cross-account · retrieved 2026-07-30