Lesson 6 of 6 AWS KMS and CloudHSM

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.

AWSYou
Provisions and maintains hardwareCreate crypto users
Patches firmwareManage keys
Backs up the clusterIntegrate 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.

ChooseWhen
KMSNearly always: integrated with services, fully managed, priced per request
CloudHSMRegulation demands single-tenant HSMs under your sole control, or apps need PKCS#11/JCE/CNG or operations KMS lacks
Sort into groups

KMS or CloudHSM?

Exam skills 1.3.1 · 1.3.2

Choose between KMS and CloudHSM for each requirement.

Log in to try this activity Interactive activities are free with an account.
Worked example

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.

RequirementChoiceWhy
Encrypt EBS, S3 and RDS data with keys you controlKMSIntegrated with services; fully managed
Keys in a single-tenant HSM under your exclusive control, FIPS 140-3 Level 3CloudHSMDedicated hardware; AWS cannot access keys
Offload TLS processing from web serversCloudHSMSupports SSL/TLS offload
Oracle Transparent Data Encryption on EC2CloudHSMPKCS#11 integration
KMS-integrated services but keys must be in your own HSMKMS custom key store backed by CloudHSMCombines 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.

Check yourself

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.