AWS CloudHSM gives you single-tenant hardware security modules in your own VPC, which means the users, passwords, quorum settings and key sharing inside those HSMs are entirely yours to run. AWS operates the hardware and the service, but it cannot see your HSM users or keys, and it cannot recover them if your admin credentials are lost. This guide explains how CloudHSM clusters, HSM users, quorum authentication, backups and the FIPS and non-FIPS cluster modes work, and which customer-side settings decide whether a cluster is resilient and well governed. It is written for AWS cryptography, platform and security engineers who build on CloudHSM through PKCS #11, JCE, OpenSSL or the CloudHSM CLI. For the managed key service that most AWS workloads use instead, see the AWS KMS Security Guide.
This is an independent guide from NHI Mgmt Group, based on AWS's public CloudHSM documentation as of November 2026. It is not sponsored or reviewed by AWS. Product features change, so confirm settings against AWS's current documentation.
Key takeaways
- You own the HSM identities. Admins, crypto users and their credentials live inside the HSM; AWS states it cannot view or modify your users or keys, and cannot help if you lose access to them.
- Plan for N+1 across Availability Zones. AWS recommends at least +1 redundancy, HSMs spread across as many Availability Zones as possible, and at least three HSMs in different zones when newly generated keys must be durable.
- Turn on quorum for user management. M of N approval, with M from 2 to 8, stops a single compromised admin password from creating users or resetting other users' passwords.
- Backups are automatic but you set retention. CloudHSM backs up each cluster at least once every 24 hours and on cluster lifecycle events; you choose retention between 7 and 379 days and decide whether to copy backups to a second Region.
- Cluster mode is a one-time decision. FIPS or non-FIPS mode cannot be changed after a cluster is created, and backups restore only into a cluster of the same mode. hsm2m.medium (FIPS 140-3) is now the HSM type for all new clusters.
What CloudHSM is
CloudHSM provisions HSMs into subnets of your VPC and groups them into a cluster. Applications on EC2, containers or Lambda talk to the HSMs through the CloudHSM Client SDK (PKCS #11 library, JCE provider, OpenSSL Dynamic Engine and the CloudHSM CLI). There are two planes, and they are governed separately:
- Control plane: the AWS API (
cloudhsmv2) that creates clusters, adds and removes HSMs, and manages backups. It is governed by IAM policies and recorded in AWS CloudTrail. - Data plane: the HSM itself. Logins, user management and every key operation are authorised by HSM users and their credentials, not by IAM, and are recorded in HSM audit logs that CloudHSM delivers to Amazon CloudWatch Logs.
That split is the most important thing to understand. An IAM principal with cloudhsm:* can delete HSMs or backups but cannot use a key; an HSM crypto user can use keys but cannot delete the cluster. Both need protecting.
| Need | AWS KMS | AWS CloudHSM |
|---|---|---|
| Who authorises key use | IAM and key policies | HSM users (crypto users) inside the HSM |
| Typical interface | AWS SDK and service integrations | PKCS #11, JCE, OpenSSL Dynamic Engine, CloudHSM CLI |
| Who manages HSM users and quorum | AWS, behind the service | You |
| Fits | Encryption at rest across AWS services, envelope encryption | Applications needing direct HSM APIs, single-tenant HSMs or a KMS custom key store |
Both services are AWS offerings and are often used together; the right choice depends on whether your application needs direct HSM interfaces and customer-run HSM users. The HSM Deployment and Operations Guide covers HSM operating principles that apply beyond AWS.
Clusters and high availability
All HSMs in a cluster are kept synchronised: users, keys and policies created on one HSM are replicated to the others by the appliance user. The Client SDK load balances across the HSMs it can reach. Each cluster holds one HSM type only.
| Design question | AWS guidance | What it means in practice |
|---|---|---|
| How many HSMs | At least +1 redundancy: if two HSMs are needed at peak, run three | Load test at expected peak first, then add one |
| Where | Spread HSMs across as many Availability Zones as possible; three HSMs across three zones | One subnet per zone in the cluster's subnet group |
| Durable new keys | At least three HSMs in different zones in a Region | A key generated on a single HSM is at risk until it is synchronised and backed up |
| Maintenance | AWS may replace HSMs; in-progress operations on a replaced HSM may fail and must be retried | Build retry logic into applications |
| Network | Launch HSMs and clients in private subnets; use VPC endpoints for the CloudHSM API | No internet path is needed for clients or the control plane |
| Cost control | Hourly fee per HSM; you may delete all HSMs and restore from backup later | Suits periodic workloads such as monthly code signing |
Capacity limits differ by HSM type. AWS documents 3,300 keys per cluster for hsm1.medium and 16,666 total keys, with at most 3,333 asymmetric keys, per cluster for hsm2m.medium. Alarm well before those limits.
Users and roles
HSM users are managed with the CloudHSM CLI (Client SDK 5). AWS notes that admins in Client SDK 5 are the same as crypto officers (COs) in Client SDK 3, so older runbooks may use the CO term.
| User type | What it can do | Who should hold it | Controls to apply |
|---|---|---|---|
| Unactivated admin | Temporary user on the first HSM of a never-activated cluster; becomes an admin after cluster activate and a password change | The engineer bootstrapping the cluster | Activate promptly, change the password in a recorded ceremony |
| Admin | User management: create and delete users, change user passwords | A small named group of key custodians, at least two | Quorum on all user management; credentials split and vaulted |
| Crypto user (CU) | Key management (create, delete, share, import, export keys) and cryptographic operations (encrypt, decrypt, sign, verify) | Applications and a separate key-owner user | One CU per application or function; keys shared only as needed |
| Appliance user (AU) | Cloning and synchronisation of HSMs in the cluster; exists on every HSM with limited permissions | AWS CloudHSM, for replication | None to manage; AWS states it cannot view or use your keys |
- At least two admins: AWS recommends two or more admins so one can reset another's lost password. With one admin, a lost password can lock you out of user management for good.
- Separate crypto users: AWS recommends multiple CUs with limited permissions, for example one CU that generates keys and shares them with application CUs that only use them. Key owners control sharing; a CU cannot use another CU's key unless it has been shared with it.
- Application credentials are NHI secrets: each application CU's username and password is a machine credential. Store it in a secrets manager, scope it to one workload and rotate it. See the Secrets Management Guide.
Quorum authentication
Quorum (M of N access control) means no single admin can perform a protected operation alone. In CloudHSM CLI it covers admin user management: creating and deleting HSM users and changing another user's password.
| Quorum property | Documented value |
|---|---|
| Minimum approvers (M) | Choose from 2 to 8 |
| Approval method | Admins sign a quorum token with their registered key; the requester's own signature counts as one approval |
| Token lifetime | 10 minutes after creation by default |
| Token storage | Up to 1,024 tokens per HSM; expired tokens are purged when the limit is reached |
| Concurrency | One active token per admin service per HSM at a time |
| MFA interaction | If MFA is enabled, the same key is used for quorum and MFA |
Set M high enough that two colluding people cannot act alone where your risk demands it, and keep N comfortably above M so holidays and leavers do not block urgent changes. Register more approvers than you need and test a quorum approval at least once a quarter.
Backups
You cannot request a backup directly. CloudHSM backs up each cluster at least once every 24 hours, and also when you activate a cluster, add an HSM to an active cluster or remove one. Each backup holds encrypted copies of users, key material and certificates, and HSM configuration and policies. When a new HSM joins, CloudHSM restores the latest backup onto it.
| Layer | How AWS documents it |
|---|---|
| Ephemeral backup key (EBK) | A unique AES-256 key generated inside the HSM for each backup; encrypts the HSM's data using AES key wrapping that complies with NIST SP 800-38F |
| Persistent backup key (PBK) | An AES-256 key that wraps the EBK, derived inside the HSM with a NIST SP 800-108 counter mode KDF |
| KDF inputs | The manufacturer key backup key (embedded in hardware) and the AWS key backup key (installed when the HSM is first configured) |
| Storage | Encrypted again with AWS KMS and held in a service-controlled S3 bucket in the cluster's Region |
| Restore target | Only AWS-owned HSMs from the same manufacturer; a restore overwrites data on the target HSM |
AWS states it cannot decrypt backups. The customer-side decisions are:
- Set retention deliberately. The backup retention policy accepts a value between 7 and 379 days. Match it to how far back you might need a deleted key, for example after an accidental
key deleteby a crypto user. - Copy to a second Region if your recovery plan needs Regional resilience. Copied backups can seed a cluster elsewhere.
- Protect the control plane. Restrict
cloudhsm:DeleteBackup,cloudhsm:DeleteClusterandcloudhsm:DeleteHsmto a break-glass role, and alert on them in CloudTrail. See the AWS CloudTrail Guide. - Remember what a backup contains. Users and passwords are restored with the keys. A backup restores access for anyone whose credentials were valid at backup time, so a user you deleted last week returns if you restore an older backup.
- Test restores. Create a cluster from a backup in a non-production account on a schedule and confirm applications can log in and use expected keys.
FIPS mode and hsm types
CloudHSM offers two cluster modes. In FIPS mode only FIPS-validated keys and algorithms can be used; non-FIPS mode offers all keys and algorithms CloudHSM supports. AWS states the mode cannot be changed after the cluster is created, and a backup restores only into a cluster of the same mode.
| Attribute | hsm1.medium | hsm2m.medium |
|---|---|---|
| FIPS validation | FIPS 140-2 | FIPS 140-3 |
| Cluster modes | FIPS only | FIPS or non-FIPS |
| Backup and restore | To hsm1.medium or hsm2m.medium clusters in FIPS mode | To hsm2m.medium clusters only |
| Key capacity per cluster | 3,300 keys | 16,666 total, at most 3,333 asymmetric |
| Client SDK | 3.1.0 and later | 5.9.0 and later |
| Status | No new clusters; end of support 31 March 2026 | Available in every Region where CloudHSM is offered |
- hsm1.medium retirement: AWS's deprecation notice says new hsm1.medium clusters could not be created from April 2025, managed migration of existing clusters to hsm2m.medium began in January 2026, and support ended on 31 March 2026. Options are a CloudHSM-managed migration or a new hsm2m.medium cluster created from a backup with a blue/green cutover. Confirm any remaining hsm1.medium clusters with
describe-clusters. - Client SDK 3 to 5: AWS says to move to the latest Client SDK before migrating to hsm2m.medium. Client SDK 5 replaces the older key management and CloudHSM management utilities with the CloudHSM CLI, so update runbooks and scripts at the same time.
- Mechanisms removed from FIPS mode: since 1 January 2024, FIPS mode clusters no longer support Triple DES key generation or encryption (decryption still works) or RSA PKCS#1 v1.5 padding for wrap, unwrap, encrypt and decrypt (for example
CKM_RSA_PKCSandRSA/ECB/PKCS1Padding). Non-FIPS clusters still support them. Plan migration to RSA OAEP and AES rather than choosing non-FIPS mode to keep legacy mechanisms. - Choosing a mode: choose FIPS mode where a regulation, contract or internal policy requires FIPS-validated cryptography, or where you are unsure, since you cannot convert later. Choose non-FIPS mode only for a named need such as a legacy mechanism with a dated retirement plan, and record the decision.
For how FIPS 140-3 validation works, see the NIST standard listed below and the Cryptographic Key Management Guide.
Monitoring and framework mapping
AWS's monitoring guidance has four sources: Client SDK logs (write them to the console on ECS and Lambda so they reach CloudWatch), HSM audit logs in CloudWatch Logs (every client-initiated management command, including logins and user and key management), CloudTrail for control-plane API calls, and CloudWatch metrics grouped by Region, cluster or HSM.
- Alarms AWS recommends: approaching the key limit, HSM session limit or HSM user limit on an HSM; differences in user or key counts between HSMs (synchronisation problems); and unhealthy HSMs.
- Alarms to add: any user creation, deletion or password change outside an approved change; failed admin logins; and
DeleteBackup,DeleteHsmorDeleteClusterAPI calls. - Metrics: number of healthy HSMs per Availability Zone against target; days since the last successful test restore; count of admins and quorum approvers available; percentage of application CUs with credentials in a secrets manager and rotated in policy; key count as a percentage of the HSM type limit.
| CloudHSM control | NIST SP 800-53 Rev 5 | NIST CSF 2.0 | ISO/IEC 27001:2022 Annex A |
|---|---|---|---|
| Key generation, sharing and lifecycle in the HSM | SC-12, SC-13 | PR.DS-01 | A.8.24 Use of cryptography |
| Quorum and separate crypto users | AC-5 | PR.AA-05 | A.5.3 Segregation of duties |
| Backups, retention and test restores | CP-9 | PR.DS-11 | A.8.13 Information backup |
| HSM audit logs and CloudTrail review | AU-2, AU-6 | DE.CM-09 | A.8.15 Logging |
Common failure patterns
- Single admin, no quorum: one admin password is the only path to user management. A lost password locks the cluster's users in place; a stolen one gives full user control. Keep at least two admins and enable quorum.
- Two HSMs in one zone: the cluster looks redundant but an Availability Zone event takes out both. Spread HSMs across zones and keep +1 capacity.
- Every application shares one crypto user: a credential leak from any workload exposes every key, and audit logs cannot tell applications apart. Use one CU per application and share keys only where needed.
- Wrong cluster mode: a non-FIPS cluster built for convenience later fails an audit that requires FIPS-validated cryptography, and the mode cannot be converted. Decide and record the mode before creation.
- Untested restore: backups exist but nobody has created a cluster from one, so credentials, client configuration and trust anchors are missing on the day it matters. Test on a schedule.
- Control plane left open: broad
cloudhsm:*IAM permissions let a compromised role delete HSMs and backups even though it cannot use keys. Limit destructive actions and alert on them.
Practitioner checklist
- Confirm every cluster is hsm2m.medium with
describe-clustersand that clients run Client SDK 5.9.0 or later. - Record the FIPS or non-FIPS mode decision and its justification for each cluster.
- Run at least three HSMs across three Availability Zones for production, sized at peak plus one.
- Keep at least two admins, store their credentials under split custody, and enable quorum for all user management.
- Create one crypto user per application plus a separate key-owner CU; vault and rotate application credentials.
- Set backup retention between 7 and 379 days to match recovery needs, and copy backups to a second Region where required.
- Restrict and alert on
DeleteBackup,DeleteHsmandDeleteCluster; place HSMs and clients in private subnets with VPC endpoints. - Send HSM audit logs and Client SDK logs to CloudWatch and alarm on user changes, limits and unhealthy HSMs.
- Test a restore into a non-production cluster at least twice a year and after major changes.
- Apply vendor security updates promptly and track the AWS security bulletins.
Standards and references
- AWS: HSM user types for CloudHSM CLI
- AWS: Managing quorum authentication using CloudHSM CLI
- AWS: Security of CloudHSM cluster backups
- AWS: CloudHSM cluster modes and HSM types
- AWS: CloudHSM deprecation notifications
- AWS: Best practices for CloudHSM cluster management
- AWS: Best practices for monitoring CloudHSM
- NIST: FIPS 140-3 Security Requirements for Cryptographic Modules
Related NHI Mgmt Group resources: AWS KMS Security Guide · HSM Deployment and Operations Guide · Cryptographic Key Management Guide · AWS Security Guide · Secrets Management Guide