More Info:
Sagemaker Clusters should be encrypted with KMS Customer Managed KeysRisk Level
HighAddress
SecurityCompliance Standards
- APRA CPS 234 (Australia)
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- DPDPA
- Digital Operational Resilience Act (EU)
- ISO 27001
- ISO/IEC 27018
- ISO/IEC 27701
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- SOC2
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
Below are the console-based steps to ensure SageMaker resources are encrypted with a KMS Customer Managed Key (CMK) instead of default/AWS-managed keys.
If you tell me which specific SageMaker resources you have (Studio, classic notebooks, endpoints, training jobs), I can give you an exact click-path for each one.
1. Create a KMS Customer Managed Key
- Sign in to AWS Console and go to Key Management Service (KMS).
- In the left pane, choose Customer managed keys → Create key.
- Key type: Symmetric → Next.
- Set an alias, e.g.,
alias/sagemaker-cmk. - Configure key administrators (IAM roles/users that can manage the key).
- Configure key usage permissions (principals that SageMaker uses, e.g.:
- Your SageMaker execution roles (e.g.,
AmazonSageMaker-ExecutionRole-...) - Any IAM roles/users that create or use SageMaker resources).
- Your SageMaker execution roles (e.g.,
- Review and Create key.
- Copy the Key ID or ARN (you’ll need it in SageMaker).
2. Use the CMK for New SageMaker Resources
A. SageMaker Studio Domain
- Open Amazon SageMaker console → Domains (under Admin configurations).
-
For a new domain:
- Choose Create domain.
- Under Encryption settings:
- For Amazon EFS encryption key: select your CMK (
alias/sagemaker-cmk). - For Amazon S3 encryption key (if shown): select CMK as well.
- For Amazon EFS encryption key: select your CMK (
- Complete the wizard.
-
For an existing domain (if the console allows editing in your region/version):
- Go to Domains → select your domain.
- Choose Edit (or Update).
- Under Encryption settings, change the EFS/S3 keys to your CMK.
- Save changes.
If encryption key fields are not editable, you must create a new domain with the CMK and migrate user profiles.
B. SageMaker Notebook Instances
You cannot change the KMS key of an existing notebook instance; you must create a new one with CMK and migrate notebooks.- In SageMaker console → Notebook instances → Create notebook instance.
- Fill basic settings (name, instance type, role).
- Expand Additional configuration (or Encryption section depending on UI).
- For Encryption key, select your CMK (
alias/sagemaker-cmk). - Create the instance.
- Migrate data from the old instance:
- Copy notebooks from the old instance to S3 (or Git).
- Stop/terminate old unencrypted notebook instance once migration is complete.
C. Training / Processing / Transform Jobs
When creating jobs from the console:-
Training jobs:
- Go to Training → Training jobs → Create training job.
- Under Input data configuration / Output data configuration, set:
- KMS key for model artifacts / output data: select your CMK.
- Under Resource configuration:
- Volume KMS key (or similar field): select your CMK.
-
Processing jobs:
- Under Output configuration and Volume configuration, specify the CMK in any KMS key fields.
-
Batch transform jobs:
- Under Output data configuration, set KMS key to the CMK.
D. Endpoints and Models
-
Models:
- SageMaker console → Models → Create model.
- Under Container definition → Model artifacts (S3), if there is an option for KMS:
- Ensure the S3 bucket/object is encrypted with your CMK (set via S3 bucket policy/default encryption, using CMK).
-
Endpoints / Endpoint configurations:
- When creating an Endpoint configuration, look for:
- KMS key for storage volume or Encryption key: select your CMK.
- Create the endpoint using that endpoint configuration.
- When creating an Endpoint configuration, look for:
- Create a new Endpoint configuration referencing the CMK.
- Update the endpoint to use the new configuration (this will perform a rolling update).
3. Ensure S3 Buckets Used by SageMaker Use CMK
- Go to S3 → select bucket(s) used for SageMaker input/output and model artifacts.
- Properties → Default encryption → Edit.
- Choose:
- Server-side encryption: AWS KMS keys (SSE-KMS).
- AWS KMS key: select your CMK.
- Save changes.
4. IAM Permission Check
Confirm that:- SageMaker execution roles have
kms:Encrypt,kms:Decrypt,kms:GenerateDataKey*,kms:DescribeKeypermissions on the CMK. - The CMK key policy allows those roles as key users.
If you tell me which specific SageMaker resources you have (Studio, classic notebooks, endpoints, training jobs), I can give you an exact click-path for each one.
Using CLI
Using CLI
Below are the practical AWS CLI steps to ensure SageMaker resources (“clusters”) are encrypted with a KMS customer-managed key (CMK). SageMaker does not let you “turn on KMS” in place; you must use a CMK when you create or recreate the resource.
Note the returned You can use either
2. Notebook Instances – use
You cannot change the KMS key of an existing notebook instance. You must:
Key bits:
Then create or update an endpoint to use that config:To remediate an existing endpoint, create a new encrypted endpoint config as above, then:
1. Create (or identify) a KMS CMK
If you don’t already have a CMK:KeyId (or ARN). You can also alias it:alias/sagemaker-cmk or the full key ARN in SageMaker.Make sure the key policy/IAM permissions allow your SageMaker execution roles to use kms:Encrypt, kms:Decrypt, kms:GenerateDataKey*, etc.2. Notebook Instances – use --kms-key-id
You cannot change the KMS key of an existing notebook instance. You must:- Stop and delete the old notebook (after backing up data if needed).
- Recreate it with a CMK.
3. Training Jobs – encrypt volumes and output
You can’t modify a running/completed training job, but you can ensure new jobs use a CMK via--resource-config and (optionally) --output-data-config.VolumeKmsKeyIdin--resource-configKmsKeyIdin--output-data-config(for S3 output encryption with that CMK)
4. Endpoint Configurations – encrypt model data
For real-time endpoints, the “cluster” storage is defined in the endpoint configuration:5. SageMaker Studio Domains & User Profiles (if applicable)
For Studio, you specify KMS keys at domain creation time; for existing domains, some encryption settings are not mutable and require re-creation if your security policy demands CMK use everywhere.Example (simplified):6. Verification
For each resource type, usedescribe-* and look for the KMS fields:- Notebook:
aws sagemaker describe-notebook-instance --notebook-instance-name ...
→KmsKeyId - Training job:
aws sagemaker describe-training-job --training-job-name ...
→ResourceConfig.VolumeKmsKeyId,OutputDataConfig.KmsKeyId - Endpoint config:
aws sagemaker describe-endpoint-config --endpoint-config-name ...
→KmsKeyId - Domain:
aws sagemaker describe-domain --domain-id ...
→KmsKeyId
Using Python
Using Python
Below is a practical, step‑by‑step way to enforce KMS CMK encryption for SageMaker resources using Python (boto3). Adjust to whatever “cluster” means in your environment (most often: training jobs, notebook instances, endpoint configs, processing jobs, or SageMaker Studio domains).
Ensure your IAM role has permissions for:
You can then use either
For existing domains you must use (Only some fields are required; include what your environment needs.)
You can then:
If you tell me which exact SageMaker resource type your “clusters” refer to (e.g., Studio domains, processing job clusters, or training clusters), I can give a narrower script tailored precisely to that.
1. Prerequisites
kms:CreateKey,kms:DescribeKey,kms:ListAliases,kms:CreateAliaskms:Encrypt,kms:Decrypt,kms:GenerateDataKey*sagemaker:*(or the specific APIs you use)
2. Create (or re‑use) a KMS Customer Managed Key (CMK)
cmk_arn or "alias/sagemaker-cmk" in SageMaker APIs.3. New SageMaker resources: use CMK in create calls
3.1. Notebook instances
3.2. Training jobs
3.3. Endpoint configurations
3.4. Processing jobs
3.5. SageMaker Studio domain
If you’re using Studio “clusters” (Jupyter kernels, apps) you must set encryption at the domain:update_domain:4. Existing SageMaker resources without CMK
Most SageMaker resources cannot be retrofitted with a KMS key in place; you typically must:- Discover resources without CMK.
- Recreate them with
KmsKeyId/VolumeKmsKeyId/OutputDataConfig.KmsKeyIdset.
- For notebooks: create new notebooks with
KmsKeyId, move data, then delete old ones. - For endpoints: create new endpoint configs with
KmsKeyId, update endpoints to use them. - For jobs: enforce CMK for all new jobs; old jobs are historical.
5. KMS key policy (optional but recommended)
Ensure your SageMaker execution role can use the CMK:If you tell me which exact SageMaker resource type your “clusters” refer to (e.g., Studio domains, processing job clusters, or training clusters), I can give a narrower script tailored precisely to that.

