Choosing Between AWS KMS and AWS CloudHSM
This lesson explains how AWS CloudHSM provides dedicated hardware security modules for customers who need exclusive control over keys and cryptographic hardware.
Learning outcomes
After completing this lesson, you will be able to:
- Describe the shared responsibility for CloudHSM.
- Identify CloudHSM interfaces and uses.
- Choose between KMS and CloudHSM.
Shared responsibility
CloudHSM gives you dedicated hardware security modules, and responsibility is split more sharply than with KMS. AWS provisions and maintains the hardware, patches its firmware and backs up the cluster. You create and manage the crypto users who can use the HSMs, create and manage the keys, and integrate your applications using standard interfaces. AWS cannot see or use your keys. The following table summarises the division.
| AWS | You |
|---|---|
| Provisions and maintains hardware | Create crypto users |
| Patches firmware | Manage keys |
| Backs up the cluster | Integrate applications |
HSMs are single-tenant in your VPC. AWS has no access to your keys: lose all crypto officer credentials and keys are unrecoverable. Spread HSMs across AZs for availability.
Interfaces and uses
AWS CloudHSM provides dedicated, single-tenant hardware security modules in the customer's VPC, which the customer manages and AWS cannot access. Applications use them through industry-standard interfaces: PKCS#11, the Java Cryptography Extension (JCE), and Microsoft CNG and KSP.
CloudHSM suits cases that KMS does not cover: offloading SSL/TLS processing from web servers, Oracle Transparent Data Encryption, protecting the private keys of a certificate authority, and regulations that require customer-controlled, single-tenant HSMs. A KMS custom key store backed by a CloudHSM cluster lets AWS services use the familiar KMS APIs while the key material stays in the customer's cluster. An external key store goes further, keeping keys in an HSM outside AWS altogether.
KMS or CloudHSM?
KMS is the right choice for nearly every workload. It is fully managed, integrates directly with S3, EBS, RDS and most other services, is priced per request, and its key policies and CloudTrail logging meet most compliance needs.
CloudHSM is chosen only when a specific requirement rules KMS out. Some regulations demand single-tenant HSMs under the customer's sole control. Some applications need standard cryptographic interfaces, such as PKCS#11, Java JCE or Microsoft CNG, for example to offload TLS or to act as a certificate authority for an Oracle database. Others need operations or algorithms that KMS does not offer. When only the HSM control matters but KMS integration is still wanted, a KMS custom key store backed by CloudHSM combines the two. The following table summarises the choice.
| Choose | When |
|---|---|
| KMS | Nearly always: integrated with services, fully managed, priced per request |
| CloudHSM | Regulation demands single-tenant HSMs under your sole control, or apps need PKCS#11/JCE/CNG or operations KMS lacks |
KMS or CloudHSM?
KMS or CloudHSM?
Most encryption requirements are met by AWS KMS, but some call for CloudHSM. The following table identifies the appropriate choice for several requirements and the reason in each case.
| Requirement | Choice | Why |
|---|---|---|
| Encrypt EBS, S3 and RDS data with keys you control | KMS | Integrated with services; fully managed |
| Keys in a single-tenant HSM under your exclusive control, FIPS 140-3 Level 3 | CloudHSM | Dedicated hardware; AWS cannot access keys |
| Offload TLS processing from web servers | CloudHSM | Supports SSL/TLS offload |
| Oracle Transparent Data Encryption on EC2 | CloudHSM | PKCS#11 integration |
| KMS-integrated services but keys must be in your own HSM | KMS custom key store backed by CloudHSM | Combines both |
With CloudHSM, the customer manages users and keys, and must deploy HSMs in at least two Availability Zones for high availability. If the question does not require dedicated hardware or direct cryptographic APIs, KMS is the answer.
Who manages the users and keys in a CloudHSM cluster?
Show answer
The customer. AWS manages the hardware, but only the customer's crypto users can access the keys, which suits requirements for single-tenant HSMs under exclusive control.
Exam Tips
Remember for the exam
- A single-tenant HSM under the customer's exclusive control is CloudHSM.
- To use KMS-integrated services while keeping keys in your own HSMs, use a KMS custom key store.
- Deploy CloudHSM across several Availability Zones for availability.
- The default choice for service encryption is KMS; use CloudHSM only for strict single-tenant requirements.
- For Oracle TDE or SSL offload with HSMs under customer control, use CloudHSM.