More Info:
Sagemaker Endpoints 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 steps to ensure SageMaker endpoints use a KMS customer-managed key (CMK) for encryption at rest.
1. Create or identify a KMS customer-managed key
- In the AWS Management Console, go to Key Management Service (KMS).
- In the left menu, choose Customer managed keys.
- Either:
- Use an existing key: Note the Key ID or ARN; or
- Create a new key:
- Click Create key.
- Key type: Symmetric → Next.
- Set an alias (e.g.,
alias/sagemaker-endpoints). - Configure key administrators and usage permissions.
- Under Key users, add the SageMaker execution role(s) used by your endpoints (IAM role that your SageMaker models/endpoint use).
- Finish the wizard and create the key.
2. Create a new Endpoint Configuration using the CMK
You cannot edit an existing endpoint configuration; you must create a new one and then update the endpoint to use it.- Go to Amazon SageMaker console.
- In the left navigation pane, choose Endpoint configurations.
- Click Create endpoint configuration.
- Enter a Name for the configuration.
- Under Production variants:
- Choose the Model.
- Choose Instance type, Initial instance count, etc.
- For Encryption key (KMS) or Volume encryption (label may vary):
- Select Enter a KMS key ARN or select from the dropdown.
- Provide the KMS CMK ARN you prepared in step 1.
- (Optional but recommended) Configure Data capture:
- Enable Data capture.
- Select or specify the S3 location.
- For KMS key for data capture (if shown), select the same CMK or another CMK ARN.
- Click Create endpoint configuration.
3. Update the existing Endpoint to use the new configuration
- In the SageMaker console, go to Endpoints.
- Click the endpoint that is reported as non-compliant.
- Choose Update (or Update endpoint).
- Under Endpoint configuration, select the new endpoint configuration you created.
- Review settings and click Update endpoint.
4. Verify encryption with CMK
- After the update finishes, open the Endpoint details.
- Confirm it references the new endpoint configuration.
- Open the Endpoint configuration details and verify:
- The KMS key ARN is your customer-managed key for:
- Production variant volume encryption.
- Data capture (if enabled).
- The KMS key ARN is your customer-managed key for:
Using CLI
Using CLI
Below are step‑by‑step AWS CLI instructions to ensure SageMaker endpoints use a KMS customer managed key (CMK) for encryption at rest.Important: Encryption settings for a SageMaker endpoint are defined in its endpoint configuration and cannot be changed in-place. To remediate, you must:
Note the You can use either the alias (Attach this policy to the IAM role used by the SageMaker endpoint (its execution role).
In the output, note This file contains:
If using data capture and you want that encrypted with the same CMK:Create the new endpoint configuration:
You can monitor the update:Wait until status is
This sequence ensures that the SageMaker endpoint’s storage (including model artifacts on the endpoint instances, and optionally data capture) is encrypted with your customer managed KMS key using only AWS CLI.
- Create/use a KMS CMK.
- Create a new endpoint configuration using that CMK.
- Update the endpoint to use the new config.
1. Create (or identify) a KMS CMK
If you don’t already have a CMK for SageMaker:KeyMetadata.KeyId from the output (e.g. 1234abcd-12ab-34cd-56ef-1234567890ab).Optionally give it an alias:alias/sagemaker-endpoint-kms) or the key ID/ARN in the next steps.Ensure your SageMaker execution role has permissions:2. Get the current endpoint configuration
Assume your endpoint is namedmy-endpoint:EndpointConfigName, e.g. my-endpoint-config.Now get the current endpoint config details:ProductionVariants(models, instance types, counts, etc.)DataCaptureConfig(if enabled)- Any existing
KmsKeyId(likely missing or set to AWS-managed KMS)
3. Create a new endpoint configuration with KMS CMK
You cannot modify an existing endpoint config; you must create a new one.Prepare a JSON file (e.g.new-endpoint-config.json). You can base it on current-endpoint-config.json and:- Keep
ProductionVariantsthe same. - Add/update
KmsKeyIdwith your CMK. - Preserve
DataCaptureConfigif you use it (you can also add aKmsKeyIdinside the data capture config if needed).
new-endpoint-config.json:4. Update the endpoint to use the new KMS-encrypted config
Now point the existing endpoint to the new endpoint configuration:InService.5. (Optional) Clean up old endpoint configuration
Once the endpoint is stable and using the KMS CMK, you can delete the old, unencrypted endpoint config (not strictly required but good hygiene):This sequence ensures that the SageMaker endpoint’s storage (including model artifacts on the endpoint instances, and optionally data capture) is encrypted with your customer managed KMS key using only AWS CLI.
Using Python
Using Python
To use a KMS customer-managed key (CMK) for SageMaker endpoints, you must:
If you already have the CMK:
- Have (or create) a KMS CMK.
- Create a new endpoint configuration that references that CMK.
- Update the endpoint to use the new configuration.
1. Prerequisites
2. Create or get a KMS CMK
If you already have a CMK with a known key ID or alias, skip to step 3.3. Inspect the current endpoint (to copy its settings)
4. Create a new endpoint configuration with the CMK
You must create a new config; you cannot modify the existing one.Key fields that support KMS encryption:KmsKeyIdinProductionVariants→ encrypts the ML storage volume.DataCaptureConfig.KmsKeyId(if using data capture).AsyncInferenceConfig.OutputConfig.KmsKeyId(if using async inference).
5. Update the endpoint to use the new configuration
6. (Optional) Clean up old endpoint configuration
Once the endpoint isInService and stable on the new configuration:Summary
- Use a KMS CMK (not the default AWS-managed key).
- Attach
KmsKeyIdin:ProductionVariantsfor the endpoint storage volume.DataCaptureConfig.KmsKeyIdandAsyncInferenceConfig.OutputConfig.KmsKeyIdif those features are used.
- You must create a new endpoint configuration and then update the endpoint to use it.

