Arkinu
AWS service comparison

AWS CloudHSM vs AWS KMS: differences and when to use each

AWS CloudHSM
AWS KMS

Often confused on the examQuestions tend to offer one as a distractor for the other: look for the phrase in the scenario that tips the balance.

Security, Identity, and Compliance

AWS CloudHSM

Single-tenant hardware security modules (HSMs) in the AWS Cloud that give you full control of your cryptographic keys and the algorithms you use. Use it when you need to operate your own HSMs instead of a fully managed key service.

Exam phrases that point here

  • «dedicated, single-tenant HSMs»

    CloudHSM gives the customer their own HSMs inside their VPC; other customers do not share those HSMs.

    When not: If the scenario only asks for managed keys with auditing and integration with AWS services, AWS KMS is simpler and cheaper: it also protects keys in validated HSMs (FIPS 140-3 Level 3), although in KMS's fleet of HSMs rather than in dedicated HSMs.

  • «AWS must not be able to access the encryption keys»

    In CloudHSM, the credentials and the keys belong only to the customer: AWS manages the hardware but cannot get in or recover the keys.

    When not: If the requirement is that the keys be outside AWS, on your own infrastructure, a KMS external key store fits. And if controlling the key policy is enough, a KMS customer managed key meets it.

  • «the application uses PKCS#11, JCE, or OpenSSL for cryptographic operations»

    CloudHSM provides libraries with those standard interfaces; KMS does not integrate natively with them and requires calling its API.

    When not: If the application can use the AWS SDK and there is no dedicated HSM requirement, KMS avoids managing clusters, users, and backups.

  • «use keys from your own HSM with AWS services such as S3 or EBS»

    A KMS custom key store backed by CloudHSM generates the keys in the customer's cluster, and integrated services use them like any other KMS key.

    When not: That key store has no automatic rotation, no asymmetric keys, and no key import. If there is no dedicated HSM requirement, the standard KMS key store is the simplest answer.

  • «Oracle Transparent Data Encryption (TDE) with keys in an HSM»

    CloudHSM has a tested integration with Oracle Database to store the TDE master key.

    When not: There is no direct support for Amazon RDS for Oracle: the path is KMS with a custom key store backed by CloudHSM.

  • «card payment operations, such as translating PIN blocks»

    It is an HSM encryption clue in the financial sector, which is why it is usually associated with CloudHSM.

    When not: CloudHSM offers general-purpose HSMs and does not currently perform payment operations such as PIN block translation; for that, AWS has AWS Payment Cryptography.

Study AWS CloudHSM →

Security, Identity, and Compliance

AWS KMS

Managed service for creating and controlling the keys used to encrypt and sign data. The keys are protected by hardware security modules (HSMs), never leave the service unencrypted, and access to them is controlled with key policies.

Exam phrases that point here

  • «encrypt data at rest with managed keys whose usage is audited»

    AWS KMS centralizes encryption keys, integrates with most AWS services, and every use of a key is logged in AWS CloudTrail.

    When not: If the scenario requires dedicated single-tenant HSMs under the customer's exclusive control, it points to AWS CloudHSM. And if it only asks to encrypt S3 objects with no requirements for key control or auditing, default SSE-S3 encryption may be enough.

  • «control who can use the key and rotate it automatically»

    With a customer managed key in KMS, the customer defines the key policy, can turn on automatic rotation, and can disable the key or schedule its deletion.

    When not: AWS managed keys do not allow changing their policy. And if regulations require that keys be stored and used outside AWS, the answer is an external key store or CloudHSM, not a standard KMS key.

  • «encrypt large files in the application with a managed key»

    With envelope encryption, KMS returns a data key; the application encrypts the file locally with it and stores the encrypted data key alongside the file. Only the key travels to KMS, not the data.

    When not: If the data goes to an AWS service integrated with KMS (Amazon S3, Amazon EBS, Amazon RDS), it is enough to turn on its encryption with a KMS key: the service performs envelope encryption on its own.

  • «share encrypted S3 objects with another AWS account»

    Objects encrypted with SSE-KMS need permission on the key to be read. With a customer managed key, its key policy can grant access to the other account.

    When not: Objects encrypted with the S3 AWS managed key (aws/s3) cannot be shared across accounts. If the objects use SSE-S3, KMS is not involved and access depends only on the S3 policies.

  • «audit who used the encryption key and when»

    All administrative and cryptographic calls to KMS are recorded in AWS CloudTrail.

    When not: AWS owned keys, which some services use by default, do not generate CloudTrail logs and do not support policies; if you need to audit, you need a key in the customer's account.

Study AWS KMS →