Study guide
11.3 Imported Key Material (BYOK) & CloudHSM Key Stores
AWS Certified Security – Specialty SCS-C03
Track your progress as you read
Finished sections get a check mark.
1 Chapter 0: Getting Started with the SCS-C03 Exam
0.1 SCS-C03 Exam Format, Domains & Study Strategy
2 Chapter 1: Security Monitoring, Alerting & Threat Detection Services
1.1 Workload Monitoring & Health Check Strategies 1.2 Amazon GuardDuty Architecture & Finding Types 1.3 AWS Security Hub & Automated Conformance Assessment 1.4 Amazon Macie & Automated Data Classification
3 Chapter 2: Enterprise Logging Architecture & Analysis
2.1 Multi-Account CloudTrail & Organization Trails 2.2 Amazon Security Lake & OCSF Log Normalization 2.3 Network Telemetry: VPC Flow Logs & Route 53 Resolver Logs 2.4 Troubleshooting Security Telemetry & Log Ingestion 2.5 Analyzing, Normalizing & Correlating Security Logs
4 Chapter 3: Incident Readiness, Response Planning & Automated Runbooks
3.1 Incident Response Planning & Blast Radius Mitigation 3.2 Testing & Validating Incident Response Plans 3.3 Automated Incident Remediation with EventBridge & Step Functions 3.4 Systems Manager OpsCenter & Incident Manager Runbooks
5 Chapter 4: Digital Forensics, Evidence Preservation & Root Cause Analysis
4.1 Forensic Artifact Capture & Chain of Custody 4.2 Threat Containment & Network Quarantine Techniques 4.3 Correlating Events & Root Cause Analysis with Amazon Detective
6 Chapter 5: Edge Protection, WAF & DDoS Mitigation
5.1 CloudFront Security Headers & Origin Access Control 5.2 AWS WAF Architecture & Advanced Rule Sets 5.3 AWS Shield Advanced & DDoS Defense Architectures 5.4 Edge Integrations: Managed Rule Groups, OCSF Ingestion, IoT Policies & CORS
7 Chapter 6: Compute Workload Hardening, Vulnerability Management & GenAI Security
6.1 Golden AMIs & Container Image Hardening Pipelines 6.2 Amazon Inspector Vulnerability Management & Patch Automation 6.3 Generative AI Security: Amazon Bedrock Guardrails & Model Protection 6.4 Instance Profiles, Service Roles & Execution Roles for Compute 6.5 Secure Administrative Access: Session Manager & EC2 Instance Connect
8 Chapter 7: Network Security, Segmentation, Private Connectivity & Encryption in Transit
7.1 Layered Traffic Filtering: SGs, NACLs & AWS Network Firewall 7.2 Hybrid Connectivity Security: VPN, Direct Connect & MACsec 7.3 Zero-Trust Access & Network Access Analysis 7.4 Enforcing Encryption in Transit: ELB Security Policies, TLS & HTTPS-Only Access 7.5 Private Access: VPC Endpoints, PrivateLink, Client VPN & Verified Access 7.6 Inter-Resource Encryption in Transit: Nitro, EMR, EKS & SageMaker AI
9 Chapter 8: Enterprise Authentication, Federation & Directory Services
8.1 AWS IAM Identity Center & Enterprise IdP Integration 8.2 Amazon Cognito User Pools & Identity Pools 8.3 AWS Security Token Service (STS) & Temporary Credential Workflows 8.4 Troubleshooting Identity & Authentication Failures
10 Chapter 9: Advanced Authorization Architecture & Policy Evaluation
9.1 Complete AWS Policy Evaluation Logic & Decision Flow 9.2 Permission Boundaries & Safe Admin Delegation 9.3 Attribute-Based Access Control (ABAC) with IAM Tags
11 Chapter 10: Least Privilege, Policy Validation & External Access Auditing
10.1 IAM Roles Anywhere & Amazon Verified Permissions 10.2 Auditing External & Unused Access with IAM Access Analyzer 10.3 Analyzing Authorization Failures & Policy Simulation
12 Chapter 11: Cryptographic Services: KMS Architecture & Key Governance
11.1 AWS KMS Architecture, Key Policies & Key Types 11.2 KMS Grants, Encryption Context & Multi-Region Keys 11.3 Imported Key Material (BYOK) & CloudHSM Key Stores
13 Chapter 12: Secrets Management, Sensitive Data Masking & PKI
12.1 AWS Secrets Manager & Systems Manager Parameter Store 12.2 Sensitive Data Masking in Telemetry & Messaging 12.3 AWS Certificate Manager (ACM) & Private CA Architecture
14 Chapter 13: Storage Encryption, Integrity, Lifecycle & Backup Protection
13.1 S3 Encryption Modes & S3 Bucket Keys 13.2 Data Integrity Protection: Object Lock, Vault Lock & Code Signing 13.3 Secure Data Lifecycle, Cross-Account Replication & Backup Vault Lock 13.4 Lifecycle, Backup & Secure Replication Beyond S3: EFS, FSx, DLM, DataSync & Air-Gapped Vaults
15 Chapter 14: Multi-Account Architecture, Organizations & Control Tower Governance
14.1 AWS Organizations Structure, Hierarchy & Resource Control 14.2 AWS Control Tower Landing Zone & Guardrail Framework 14.3 Delegated Administrator Architecture & Root User Governance 14.4 Centralized Resource Sharing with RAM & Service Catalog
16 Chapter 15: Compliance Automation, Infrastructure as Code Security & Auditing
15.1 Infrastructure as Code Security & Multi-Account Deployment 15.2 AWS Config, Conformance Packs & Automated Remediation 15.3 Audit Evidence Collection & Well-Architected Security Reviews
11.3 Imported Key Material (BYOK) & CloudHSM Key Stores
Key Takeaways Explain This Topic AI
Bring your own key (BYOK) imports key material into a KMS key with Origin EXTERNAL; symmetric, asymmetric (except ML-DSA), HMAC, and multi-Region keys are supported, using a wrapping public key and import token valid for 24 hours.
Imported keys never rotate automatically, but symmetric encryption keys with imported material support on-demand rotation after new key material is imported; keep your own copy of the material because KMS doesn't provide its usual durability for it.
Imported keys can have key material deleted immediately using kms:DeleteImportedKeyMaterial , instantly placing the key in PendingImport state without the mandatory 7-to-30-day waiting period.
AWS CloudHSM provides dedicated, single-tenant HSMs (hsm2m.medium, FIPS 140-3 Level 3) in customer VPCs, accessed through PKCS#11, JCE, CNG, and OpenSSL with no AWS access to keys or HSM users.
KMS Custom Key Stores integrate AWS CloudHSM or on-premises HSMs (via External Key Store / XKS Proxy), satisfying strict data sovereignty mandates while introducing network latency, operational overhead, and throughput constraints.
Last updated: September 2026
11.3 Imported Key Material (BYOK) & CloudHSM Key Stores
While standard AWS KMS customer managed keys meet the security and compliance requirements of most cloud workloads, highly regulated industries—such as banking, healthcare, government defense, and sovereign public sectors—face mandates that forbid generating cryptographic keys within multi-tenant cloud environments.
To satisfy these stringent regulatory requirements, AWS provides three specialized cryptographic architectures: Imported Key Material (Bring Your Own Key / BYOK) , AWS CloudHSM , and KMS Custom Key Stores (including CloudHSM-backed key stores and External Key Stores / XKS ). Understanding how each architecture handles key entropy, lifecycle durability, administrative boundaries, and disaster recovery is critical for passing the AWS Certified Security – Specialty exam.
Bring Your Own Key (BYOK): Architecture & Import Workflow
By default, when you create a customer managed key in AWS KMS, KMS generates the underlying 256-bit cryptographic key material inside its own FIPS 140-2/140-3 Level 3 HSMs using a hardware-based random number generator. The Origin attribute of such a key is AWS_KMS .
When compliance regulations mandate that cryptographic keys must be generated inside an on-premises Hardware Security Module or a commercial Key Management Interoperability Protocol (KMIP) appliance, AWS KMS supports Imported Key Material (BYOK) . Keys created with imported key material have an Origin attribute of EXTERNAL .
Loading diagram...
The 5-Step Import Process
Importing external key material into AWS KMS requires a secure, multi-step cryptographic handshake:
Create the KMS Key Container : You call kms:CreateKey , specifying Origin: EXTERNAL and a key spec (for example SYMMETRIC_DEFAULT ; RSA, ECC, and HMAC specs are also supported). The KMS key container is created without any cryptographic key material. Its status is PendingImport , and it cannot perform any cryptographic operations.
Obtain Wrapping Parameters : You invoke kms:GetParametersForImport , specifying the KMS KeyId , wrapping algorithm (e.g., RSAES_OAEP_SHA_256 , RSAES_OAEP_SHA_1 , or RSA_AES_KEY_WRAP_SHA_256 ), and wrapping key spec (e.g., RSA_2048 , RSA_3072 , RSA_4096 ).
KMS Emits Parameters with a 24-Hour TTL : KMS returns two critical assets:
Public Wrapping Key : A temporary RSA public key generated inside the KMS HSM.
Import Token : A cryptographic token containing metadata that binds the wrapping key to the specific KMS key container.
Critical Constraint : Both the wrapping key and import token expire in exactly 24 hours . If the import is not completed within 24 hours, new parameters must be generated.
Wrap the Key Material On-Premises : Inside your on-premises HSM or using an approved cryptographic utility (such as OpenSSL), you encrypt (wrap) your 256-bit raw symmetric key material using the downloaded AWS public wrapping key using the agreed-upon algorithm.
Execute kms:ImportKeyMaterial : You upload the wrapped key material and the import token to AWS KMS. The KMS HSM validates the import token, unwraps the key material using its private wrapping key inside the HSM, and loads the key material into volatile HSM memory. The key state transitions to Enabled .
Expiration Settings for Imported Keys
When executing ImportKeyMaterial , you configure the key's expiration model:
KEY_MATERIAL_DOES_NOT_EXPIRE : The key material remains loaded indefinitely until explicitly deleted.
KEY_MATERIAL_EXPIRES : You define a specific UNIX epoch timestamp. When the expiration timestamp is reached, AWS KMS automatically wipes the key material from all HSMs. The key transitions back to the PendingImport state. Any workloads attempting to use the key fail immediately until the key material is re-imported.
Durability, Revocation & Lifecycle Management for Imported Keys
Managing imported key material introduces fundamental architectural trade-offs compared to native KMS keys.
The Durability Caveat (Zero AWS Backup)
For standard keys ( Origin: AWS_KMS ), AWS KMS stores encrypted copies of key material in systems designed for 99.999999999% (11 9s) durability.
Critical Core Principle : AWS KMS keeps imported key material highly available but does not maintain its durability at the same level as key material it generates. If the material expires, is deleted, or is lost in a rare failure, you must reimport it from your own copy.
The customer bears 100% of the responsibility for maintaining external, durable backups of the original key material. If you lose your on-premises copy of the key material and the key material is cleared from AWS KMS, all data encrypted under that KMS key is permanently and irreversibly lost . AWS Support cannot recover, regenerate, or extract imported key material.
Immediate Revocation via kms:DeleteImportedKeyMaterial
Standard KMS keys enforce a mandatory 7-to-30-day waiting period before key material can be destroyed ( kms:ScheduleKeyDeletion ). In contrast, imported keys provide an emergency revocation capability:
An administrator can invoke kms:DeleteImportedKeyMaterial at any time.
Deletion occurs immediately and instantaneously (zero waiting period).
The key material is erased from all KMS HSMs in the Region, and the key state reverts to PendingImport .
This allows security teams to respond instantly to active compromise: by deleting the imported key material, all access to encrypted data across all AWS services is severed in seconds.
Strict Re-Import Rules
If you delete imported key material or allow it to expire, you can restore functionality by calling ImportKeyMaterial again. However, KMS enforces an immutable cryptographic restriction:
Reimport restores the same key material : When you reimport ( ImportType: EXISTING_KEY_MATERIAL ), KMS verifies that it matches the material previously imported; different bytes fail with IncorrectKeyMaterialException .
Asymmetric and HMAC keys are permanently bound to their original key material; you can't import different material into them.
Symmetric encryption keys can take new material for on-demand rotation (see below).
Absence of Automatic Key Rotation
Imported keys do not support automatic key rotation , because AWS KMS doesn't generate the material. Two rotation methods remain:
On-demand rotation (symmetric encryption keys) : Call ImportKeyMaterial with ImportType: NEW_KEY_MATERIAL , then call RotateKeyOnDemand . The new material becomes current for encryption, and earlier imported materials still decrypt existing ciphertext, so the key ID and aliases don't change. For multi-Region keys, import the same new material into every replica before rotating the primary.
Manual rotation (all key types) : Create a new KMS key, import new material, and repoint the alias or application. This is the only option for asymmetric and HMAC keys.
AWS CloudHSM: Dedicated FIPS 140-3 Level 3 Hardware Architecture
While AWS KMS provides a multi-tenant cryptographic service (where multiple customers share the same physical HSM fleet, with logical isolation enforced by hardware firmware and KMS microkernels), certain compliance frameworks demand single-tenant isolation.
AWS CloudHSM provides dedicated, single-tenant physical Hardware Security Modules under the customer's direct administrative control. CloudHSM instances are provisioned directly inside your private Amazon VPC subnets.
Loading diagram...
Architectural Characteristics of CloudHSM
FIPS 140-3 Level 3 Validation : The current hsm2m.medium HSMs are FIPS 140-3 Level 3 validated (they can also run in a non-FIPS mode); the older hsm1.medium type (FIPS 140-2 Level 3) reached end of support on March 31, 2026.
Single-Tenant Hardware : The physical HSM appliance is dedicated entirely to your account. No other AWS customer's keys or operations touch your hardware.
Direct VPC Placement : Each CloudHSM instance attaches an Elastic Network Interface (ENI) directly into your private VPC subnet, communicating over private IP addresses.
Zero AWS Administrative Visibility : AWS personnel manage the hardware chassis, power, and physical networking, but AWS has zero logical access to the HSM . AWS cannot view, export, or recover your keys, and AWS has no administrative accounts inside the HSM.
CloudHSM User Roles
Authentication inside CloudHSM bypasses AWS IAM entirely (IAM controls only the cluster API, such as creating HSMs and backups). CloudHSM maintains its own user database; Client SDK 5 names the roles below (SDK 3 called the admin a crypto officer, or CO):
Unactivated admin (PRECO) : The default administrator before cluster activation; activation sets its password.
Admin (CO) : Creates, manages, and deletes HSM users and manages quorum settings. An admin cannot perform cryptographic operations with keys.
Crypto User (CU) : The operational user. A CU creates, uses, encrypts with, decrypts with, and shares cryptographic keys. Applications authenticate to CloudHSM using CU credentials.
Appliance User (AU) : A user that AWS uses to clone and synchronize HSMs in the cluster. It can't create or use keys.
Standard Cryptographic APIs
Unlike AWS KMS, which uses proprietary AWS REST APIs ( kms:Encrypt , kms:Decrypt ), CloudHSM exposes industry-standard cryptographic interfaces:
PKCS#11 : The standard cryptographic token interface library for C/C++ applications.
Java Cryptography Extension (JCE) : Standard provider for Java enterprise workloads.
Microsoft Cryptography Next Generation (CNG) and KSP : Standard cryptographic providers for Windows Server environments.
OpenSSL Dynamic Engine : Offloads TLS and other OpenSSL operations on Linux.
High Availability & Multi-AZ Clustering
A single CloudHSM instance represents a single point of failure. Enterprise architectures mandate deploying a CloudHSM Cluster spanning at least two Availability Zones. The CloudHSM service automatically synchronizes keys and user states between cluster members across AZs. Encrypted daily backups are automatically stored in Amazon S3, encrypted with an ephemeral hardware key that can only be decrypted by another CloudHSM instance in your cluster.
KMS Custom Key Stores: CloudHSM & External Key Store (XKS)
Many organizations desire the seamless integration of AWS KMS with native AWS services (such as EBS, RDS, S3, and Redshift) but are legally prohibited from storing master keys inside multi-tenant KMS HSMs.
AWS KMS Custom Key Stores bridge this divide by pairing the AWS KMS management API with a dedicated cryptographic backend. AWS KMS supports two types of custom key stores:
- AWS CloudHSM Key Stores
- External Key Stores (XKS)
- Feature AWS KMS (Standard) CloudHSM Key Store External Key Store (XKS)
- Key Origin AWS_KMS AWS_CLOUDHSM EXTERNAL_KEY_STORE
Cryptographic Root Multi-tenant AWS KMS HSMs Single-tenant CloudHSM cluster On-premises / External HSM outside AWS
- Hardware Control Fully managed by AWS Dedicated single-tenant in VPC Customer on-prem datacenter
- FIPS Certification FIPS 140-3 Level 3 FIPS 140-3 Level 3 (hsm2m.medium) Dependent on external key manager
- Latency Overhead Sub-10ms (Local AWS) Minor VPC transit latency High latency (network transit to on-prem)
Availability Risk 99.999% AWS managed Customer manages cluster scaling High risk (outage if on-prem link fails)
- Asymmetric Keys Fully supported Not supported in Custom Key Store Not supported in XKS
- Multi-Region Keys Fully supported Not supported Not supported
- CloudHSM-Backed Custom Key Stores
When you create a CloudHSM-backed custom key store, KMS associates with an active AWS CloudHSM cluster in your VPC:
When you create a KMS key in this store ( Origin: AWS_CLOUDHSM ), KMS creates the key material inside your dedicated CloudHSM cluster.
When an AWS service calls kms:GenerateDataKey or kms:Decrypt , KMS proxies the cryptographic operation to your CloudHSM cluster over private ENIs.
Limitations : CloudHSM-backed key stores do not support asymmetric keys, HMAC keys, or Multi-Region Keys. Furthermore, performance is constrained by the throughput capacity of your CloudHSM instances.
External Key Store (XKS): Sovereign Key Management
For organizations subject to national data sovereignty regulations (such as EU data localization directives), cryptographic keys must never reside in cloud data centers , even in dedicated cloud HSMs.
AWS KMS External Key Store (XKS) allows AWS KMS to use cryptographic keys that exist exclusively in an external key manager located outside of AWS (typically in an on-premises data center or colocation facility).
Loading diagram...
The XKS Proxy Architecture
Because external HSMs do not speak AWS KMS API protocols, XKS relies on an intermediary component: the XKS Proxy .
The XKS Proxy Specification : An open-source, customer-maintained REST API service running on an EC2 instance, ECS container, or on-premises appliance. It translates KMS XKS requests into vendor-specific HSM calls.
Secure Connectivity : KMS communicates with the XKS Proxy via an AWS PrivateLink VPC Endpoint Service (recommended for security) or over the public internet via HTTPS.
Authentication & Integrity : AWS KMS signs every request to the proxy with SigV4 using a proxy authentication credential (an access key ID and secret key that you create on the proxy and register with KMS). The proxy authenticates itself to KMS with a TLS server certificate from a public certificate authority, over TLS 1.2 or later.
Severe Operational & Architectural Trade-offs of XKS
While XKS delivers absolute data sovereignty, it introduces severe operational hazards that are heavily tested on the specialty exam:
No Local Caching in AWS : AWS KMS never caches or stores external key material . Every single cryptographic request (such as decrypting an EBS volume block or reading an S3 object) requires a real-time round-trip network call to the external on-premises HSM.
Network Latency Overhead : Network transit times across Direct Connect or VPN links add 20 to 100+ milliseconds of latency to every cryptographic operation, severely impacting database I/O performance.
Availability Dependency & Workload Outage Risk : If your corporate on-premises data center experiences a power failure, fiber cut, or HSM crash, all dependent AWS workloads fail immediately . Encrypted EBS volumes will freeze, RDS databases will crash, and S3 read requests will fail with KMS exceptions.
Specialty Exam Pitfalls & Architectural Traps
Reimport vs New Material : Reimporting ( EXISTING_KEY_MATERIAL ) must use the same bytes, or KMS returns IncorrectKeyMaterialException . To rotate a symmetric imported key in place, import with NEW_KEY_MATERIAL and call RotateKeyOnDemand ; asymmetric and HMAC imported keys still need a new KMS key and an alias update.
Expecting AWS to Recover Lost Imported Keys : If an on-premises disaster destroys your local key backups, and an imported key expires or is deleted in KMS, AWS Support cannot assist. AWS KMS does not provide its usual durability for imported key material, so your own copy is the only recovery source.
The 24-Hour Wrapping Parameter Window : Wrapping keys and import tokens obtained from GetParametersForImport are valid for exactly 24 hours . If an automation pipeline downloads parameters on Friday but executes the import on Monday, the import fails.
Instant Deletion vs Waiting Periods : Standard KMS keys require a 7-to-30-day waiting period. Imported key material can be deleted instantaneously using kms:DeleteImportedKeyMaterial , providing immediate revocation during an active breach.
XKS Network Failure Impact : XKS does not feature a local fallback cache in AWS. If the on-premises connection drops, all AWS services relying on that key will fail immediately.