Summary:

  • AWS KMS offers fully managed, multi-tenant key management with native service integrations, while CloudHSM provides single-tenant hardware security modules for organizations requiring direct cryptographic control and key exportability.
  • Both services now support FIPS 140-3 Level 3 validation, but CloudHSM delivers dedicated hardware isolation whereas KMS achieves compliance through shared infrastructure with logical separation.
  • Cost structures differ dramatically. KMS charges per API call (starting at $0.03 per 10,000 requests), while CloudHSM bills hourly per HSM instance ($1.45/hour for hsm2m.medium). Workload volume becomes the primary decision factor.
  • Custom key stores and external key stores bridge the gap, allowing KMS API convenience with CloudHSM-backed or on-premises key material for hybrid compliance scenarios.

When your security architect insists on hardware-backed key protection but your development team wants seamless API integration, you face a decision that will shape your encryption strategy for years. AWS offers two distinct paths for cryptographic key management. Choosing incorrectly can mean overpaying by thousands monthly or failing compliance audits that halt production deployments.

Study AWS Smarter with AI

Generate certification questions, explanations, and revision notes instantly.

Ask AI

Understanding the architectural differences between AWS CloudHSM and AWS Key Management Service goes beyond feature comparison. It requires grasping how each service handles key residency, tenant isolation, and the operational trade-offs that surface only under production pressure.

The following diagram illustrates the fundamental architectural distinction between these services and where your cryptographic keys physically reside in each deployment model.

kms-cloudhsm-architecture-overview
Key residency comparison between AWS KMS managed infrastructure and customer-controlled CloudHSM clusters

Understanding HSM and KMS foundational concepts

Hardware Security Modules represent the gold standard for cryptographic key protection. They provide tamper-resistant physical devices that generate, store, and perform operations with encryption keys. These specialized appliances ensure keys never exist in plaintext outside the HSM boundary, protecting against both software exploits and physical extraction attempts.

AWS CloudHSM delivers dedicated HSM instances running in your Virtual Private Cloud. This gives you exclusive access to the underlying hardware without sharing resources with other AWS customers.

AWS Key Management Service takes a different approach by abstracting the HSM layer entirely. KMS manages a fleet of HSMs behind a unified API, handling all hardware provisioning, patching, and high availability automatically. Your keys exist within this managed infrastructure, protected by the same HSM technology but without direct hardware access. This abstraction enables tight integration with over 100 AWS services while eliminating operational overhead.

Real-world context: Financial institutions processing card transactions often require CloudHSM for PCI-DSS compliance where auditors demand proof of dedicated hardware. Meanwhile, SaaS companies encrypting customer data at rest typically choose KMS for its zero-maintenance integration with S3 and RDS.

The distinction matters most when compliance frameworks specify hardware isolation requirements or when your application needs cryptographic capabilities beyond what KMS exposes through its API. The following section explores tenancy models to help you understand how this architectural difference affects your security posture.

Tenancy models and key ownership

The single-tenant versus multi-tenant distinction represents the most fundamental difference when comparing AWS HSM vs KMS architectures. CloudHSM provisions dedicated hardware exclusively for your account. No other AWS customer shares the physical HSM appliance or its cryptographic boundaries.

You receive full administrative control, including the ability to create and manage HSM users, set quorum authentication policies, and access audit logs showing every cryptographic operation.

KMS operates on a multi-tenant model where AWS manages a shared HSM fleet serving millions of customers simultaneously. Logical isolation ensures your keys remain cryptographically separated from other tenants, but the underlying hardware processes operations for multiple accounts. AWS maintains root access to the HSM infrastructure for maintenance and updates, though key material remains encrypted and inaccessible even to AWS operators.

Key ownership implications

Ownership semantics differ significantly between services. With CloudHSM, you own the keys completely:

  • Export capability: Keys can be wrapped and exported for backup, migration, or use in other systems
  • Algorithm freedom: You control which cryptographic algorithms and key types to generate
  • Lifecycle control: No AWS-imposed rotation policies or deletion schedules apply automatically

KMS keys follow AWS-managed ownership where certain restrictions apply. Customer managed keys (CMKs) cannot be exported in plaintext, though you can import your own key material for specific use cases. AWS-managed keys used by integrated services rotate automatically and cannot be deleted or modified. This trade-off between control and convenience drives many architectural decisions.

Watch out: Organizations assuming KMS keys can be extracted for disaster recovery scenarios face architectural constraints. If key portability matters for your business continuity strategy, CloudHSM or KMS with imported key material provides the necessary flexibility.

Cryptographic capabilities and algorithm support

Algorithm support diverges substantially between these services, affecting which cryptographic operations your applications can perform. KMS focuses on envelope encryption patterns using symmetric AES-256-GCM keys for most data encryption scenarios. Asymmetric key support includes RSA (2048, 3072, 4096-bit) and elliptic curve keys (ECC_NIST_P256, P384, P521, and ECC_SECG_P256K1) for signing and verification operations.

CloudHSM exposes the full cryptographic capability of the underlying PKCS#11, JCE, and OpenSSL interfaces. This includes symmetric algorithms (AES, DES3), asymmetric algorithms (RSA up to 4096-bit, ECDSA, ECDH), hashing functions (SHA-1, SHA-2 family), and HMAC operations. The flexibility enables use cases like TLS offloading, code signing, and certificate authority operations that require direct cryptographic primitive access.

Post-quantum cryptography readiness

AWS has begun integrating post-quantum algorithms to address future quantum computing threats. KMS now supports hybrid post-quantum TLS for API connections, combining classical key exchange with quantum-resistant algorithms. The service roadmap includes ML-KEM (formerly CRYSTALS-Kyber) for key encapsulation, though production availability continues rolling out through 2025-2026.

CloudHSM firmware updates have introduced experimental support for post-quantum signatures, allowing organizations to begin testing quantum-resistant certificate chains. The following table compares current algorithm support across both services:

Algorithm categoryAWS KMS supportAWS CloudHSM support
Symmetric encryptionAES-256-GCM onlyAES (128/192/256), DES3
RSA operations2048, 3072, 4096-bit (sign/verify, encrypt/decrypt)2048-4096-bit (full operations including key wrap)
Elliptic curveNIST P-256/384/521, secp256k1NIST curves, Brainpool, Edwards curves
HMACHMAC keys supportedFull HMAC with all SHA variants
Post-quantumHybrid TLS (ML-KEM in preview)Experimental firmware support
Key derivationNot supportedHKDF, SP800-108 KDF

Pro tip: If your application requires key derivation functions for session key generation or needs to perform ECDH key agreement, CloudHSM remains the only AWS-native option. KMS intentionally limits exposed primitives to prevent misuse patterns common with raw cryptographic APIs.

Compliance levels and FIPS 140-3 validation

Compliance requirements often dictate the choice between AWS CloudHSM vs AWS KMS before technical considerations enter the discussion. Both services have achieved significant compliance milestones, though the certification paths and validation levels differ in ways that matter for regulated industries.

AWS KMS HSMs achieved FIPS 140-3 Level 3 validation in late 2024, upgrading from the previous FIPS 140-2 Level 3 certification. This validation confirms that the HSM fleet protecting KMS keys meets rigorous physical security, cryptographic algorithm, and key management requirements. The multi-tenant architecture maintains compliance through logical separation enforced by the validated cryptographic boundary.

CloudHSM instances carry FIPS 140-3 Level 3 validation for the underlying Cavium/Marvell LiquidSecurity hardware. The single-tenant model means your dedicated HSM operates within its own validated cryptographic boundary without sharing that boundary with other customers. For auditors requiring evidence of dedicated hardware compliance, CloudHSM provides clearer documentation paths.

Regulatory framework alignment

Different compliance frameworks interpret HSM requirements with varying specificity:

  1. PCI-DSS: Both services satisfy cryptographic key protection requirements, though some QSAs prefer CloudHSM’s dedicated hardware for cardholder data encryption keys
  2. HIPAA: Either service meets technical safeguard requirements when properly configured with appropriate access controls
  3. FedRAMP High: KMS operates within FedRAMP High authorized regions. CloudHSM requires additional authorization documentation for the dedicated instances
  4. eIDAS (EU): Qualified electronic signature creation devices often require CloudHSM for the dedicated hardware attestation

Historical note: Before 2024, KMS HSMs held FIPS 140-2 Level 2 validation, which created compliance gaps for organizations requiring Level 3. The upgrade to FIPS 140-3 Level 3 eliminated this distinction, though some legacy compliance documentation still references the older certification levels.

Performance, latency, and architecture considerations

Performance characteristics vary dramatically based on workload patterns and deployment architecture. KMS optimizes for high-throughput envelope encryption where data keys are generated, used locally for bulk encryption, and only the wrapped key requires KMS interaction. This pattern supports thousands of encryption operations per second with minimal KMS API calls.

The following diagram shows how custom key stores and external key stores extend KMS capabilities while maintaining API compatibility.

kms-key-store-types-architecture
KMS key store options: default managed, custom with CloudHSM, and external with on-premises key managers

Throughput and quotas

KMS enforces request quotas that vary by operation type and region. Cryptographic operations (Encrypt, Decrypt, GenerateDataKey) share a combined quota of 50,000 requests per second in most regions, with higher limits available through quota increase requests. The service automatically scales within these limits without capacity planning.

CloudHSM throughput depends on instance type and cluster size:

  • hsm1.medium (legacy): Approximately 1,100 RSA 2048-bit signatures per second
  • hsm2m.medium (current generation): Up to 2,500 RSA 2048-bit signatures per second with improved AES-GCM performance

Horizontal scaling requires adding HSM instances to your cluster, with each instance contributing additional throughput. Unlike KMS, you must provision capacity ahead of demand and manage cluster sizing based on peak load requirements.

Latency profiles

KMS API calls typically complete in 5-25 milliseconds for cryptographic operations, with variance based on region, key type, and current service load. Custom key stores backed by CloudHSM add 2-5 milliseconds of latency due to the additional hop to your HSM cluster. External key stores introduce the highest latency, often 50-200 milliseconds depending on network path to your external key manager.

Direct CloudHSM access through PKCS#11 or JCE interfaces achieves sub-millisecond latency for most operations when the client runs in the same availability zone as an HSM instance. This performance advantage matters for high-frequency signing operations or TLS termination where every millisecond affects user experience.

Watch out: CloudHSM clusters require at least two HSM instances across different availability zones for production high availability. A single-instance cluster creates a single point of failure that can cause complete cryptographic operation outages during hardware failures or maintenance events.

Cost comparison for production workloads

Pricing models differ fundamentally between services, making cost comparison dependent on specific usage patterns. KMS charges based on key storage and API operations, while CloudHSM bills hourly for provisioned HSM instances regardless of utilization.

KMS pricing components (US East region, 2025):

  • Customer managed keys: $1.00 per key per month
  • API requests: $0.03 per 10,000 requests (Encrypt, Decrypt, GenerateDataKey)
  • Asymmetric operations: $0.10-$0.15 per 10,000 requests depending on key type
  • Custom key store: Additional $1.00 per key per month plus CloudHSM costs

CloudHSM pricing (US East region, 2025):

  • hsm2m.medium: $1.45 per hour per instance ($1,044 per month)
  • Minimum production deployment: Two instances across AZs ($2,088 per month base cost)

The break-even analysis favors KMS for workloads under approximately 700 million API calls monthly. Beyond this threshold, CloudHSM’s fixed-cost model becomes more economical, though operational overhead costs should factor into total cost of ownership calculations.

Monthly API callsKMS cost (10 keys)CloudHSM cost (2 instances)Recommended service
1 million$13$2,088KMS
100 million$310$2,088KMS
500 million$1,510$2,088KMS
1 billion$3,010$2,088CloudHSM

Pro tip: Implement data key caching in your application layer to dramatically reduce KMS API calls. The AWS Encryption SDK supports configurable caching that can reduce costs by 90% or more for read-heavy workloads while maintaining security through cache entry limits and TTLs.

Integration patterns and key lifecycle management

AWS service integration represents KMS’s strongest advantage over CloudHSM. Native encryption support spans storage services (S3, EBS, EFS), databases (RDS, DynamoDB, Redshift), compute services (Lambda, ECS, EKS), and analytics platforms (Kinesis, Glue, Athena). Enabling encryption typically requires selecting a KMS key during resource creation with no application code changes.

CloudHSM integration requires explicit application development using cryptographic interfaces. Your code must establish sessions with the HSM cluster, authenticate using HSM credentials, and invoke specific cryptographic operations through PKCS#11, JCE, or OpenSSL engines. This approach provides maximum flexibility but demands cryptographic engineering expertise.

Custom key stores bridge the gap

Custom key stores allow KMS API usage while storing key material in your CloudHSM cluster. This hybrid approach delivers KMS integration convenience with CloudHSM’s dedicated hardware isolation. Creating a custom key store requires an active CloudHSM cluster and appropriate IAM permissions:

External key stores extend this pattern further, connecting KMS to key managers outside AWS. The XKS (External Key Store) proxy specification enables integration with on-premises HSMs, third-party key management services, or multi-cloud key infrastructure. Latency and availability depend entirely on the external system’s performance characteristics.

Decision framework for choosing each service

Selecting between AWS CloudHSM and AWS KMS requires evaluating multiple factors against your specific requirements. The decision rarely comes down to a single criterion. The combination of compliance needs, operational capacity, and technical requirements determines the optimal choice.

Choose AWS KMS when your requirements align with these patterns:

  1. Primary use case involves encrypting data at rest across AWS services
  2. Development team lacks dedicated cryptographic engineering expertise
  3. Compliance frameworks accept multi-tenant HSM infrastructure with logical isolation
  4. Operational simplicity outweighs the need for direct key control
  5. Workload volume falls below the CloudHSM cost break-even threshold

Choose AWS CloudHSM when these requirements dominate:

  1. Regulatory or contractual obligations mandate single-tenant dedicated hardware
  2. Application requires cryptographic primitives not exposed through KMS APIs
  3. Key exportability is necessary for backup, migration, or multi-cloud scenarios
  4. Use cases include PKI, certificate authority, or TLS offloading
  5. Extremely high cryptographic operation volumes justify fixed infrastructure costs

Real-world context: Many organizations deploy both services strategically. KMS handles bulk data encryption for S3 buckets and RDS databases, while CloudHSM manages certificate authority keys and code signing operations. This hybrid approach optimizes cost and operational efficiency while meeting diverse compliance requirements.

Conclusion

The AWS HSM vs KMS decision ultimately balances control against convenience, with each service excelling in distinct operational contexts. KMS delivers unmatched integration breadth and operational simplicity for organizations prioritizing developer productivity and AWS-native encryption workflows. CloudHSM provides the dedicated hardware isolation, key exportability, and cryptographic flexibility that regulated industries and specialized security applications demand.

Both services have converged on FIPS 140-3 Level 3 validation, eliminating what was previously a significant compliance differentiator. The introduction of custom key stores and external key stores has further blurred boundaries, enabling hybrid architectures that combine KMS API convenience with CloudHSM or external key residency. As post-quantum cryptography support matures across both services through 2025-2026, organizations should evaluate their long-term cryptographic agility requirements alongside immediate operational needs.

Start with KMS for most encryption use cases, then introduce CloudHSM selectively where dedicated hardware or advanced cryptographic operations justify the additional cost and operational investment. This pragmatic approach maximizes security posture while respecting engineering capacity and budget constraints.