Skip to main content

More Info:

Sagemaker output and storage data encrypted with KMS Customer Managed Keys

Risk Level

Medium

Address

Security

Compliance 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

Using Console

Below are step‑by‑step AWS Console instructions to ensure SageMaker output and storage data are encrypted with KMS customer managed keys (CMKs). This covers:
  • S3 output data from jobs
  • Attached storage (EBS volumes) for training/processing
  • Notebook instance volumes (where applicable)

1. Create or Select a Customer Managed KMS Key

  1. In the AWS Console, go to Key Management Service (KMS).
  2. In the left menu, choose Customer managed keys.
  3. Click Create key.
  4. Key type: Symmetric → Next.
  5. Define Alias (e.g., alias/sagemaker-cmk).
  6. Set Key administrators and Key users:
    • Ensure that the IAM roles used by SageMaker (e.g., SageMaker execution roles) are added as Key users.
  7. Finish the wizard and Enable the key.
You’ll use this CMK ARN (visible in the key details) in SageMaker configurations.

2. Encrypt SageMaker Training Job Output + Storage (EBS)

When you create a new training job:
  1. Go to Amazon SageMakerTrainingTraining jobs.
  2. Click Create training job.
  3. Under Permissions and encryption:
    • KMS key for output data (or Output data configuration section):
      • Choose Enter a KMS key or Choose from your AWS KMS keys.
      • Select your CMK (e.g., alias/sagemaker-cmk).
    • KMS key for storage volume (may appear under Resource configuration or similar):
      • Set Volume KMS key / VolumeKmsKeyId to your CMK.
  4. Complete the rest of the training job configuration and Create training job.
Existing training jobs cannot be edited; create new jobs with the CMK configured.

3. Encrypt SageMaker Processing / Batch Transform Jobs

For Processing jobs:
  1. SageMakerProcessingProcessing jobsCreate processing job.
  2. Under Permissions and encryption:
    • KMS key for output data: select your CMK.
    • KMS key for volume storage (if shown): select your CMK.
  3. Configure the job and click Create.
For Batch transform jobs:
  1. SageMakerInferenceBatch transform jobsCreate batch transform job.
  2. Under Output data:
    • KMS key for output data: select your CMK.
  3. If there is a Volume KMS key field, set it to your CMK.
  4. Create the job.

4. Encrypt Model Artifacts (for Endpoints)

When creating a model:
  1. SageMakerInferenceModelsCreate model.
  2. In Container definition / Primary container:
    • If a KMS key for model artifacts (or similar) field is present, choose your CMK.
  3. Complete and create the model.
  4. Use this model for Endpoints or Batch Transform so artifacts stay encrypted with CMK.

5. Encrypt Notebook Instance Volumes (Where Needed)

You cannot change the encryption key of an existing notebook instance. Create a new one:
  1. SageMakerNotebookNotebook instancesCreate notebook instance.
  2. Under Encryption key:
    • Choose your CMK (e.g., alias/sagemaker-cmk).
  3. Migrate notebooks/code from the old instance (via Git, S3 sync, etc.), then delete the old instance.

6. Encrypt SageMaker Studio (If You Use Studio)

For a new Studio Domain:
  1. SageMakerSageMaker DomainCreate domain.
  2. In Encryption key, choose your CMK.
  3. Finish the domain creation.
For User profiles under that domain, ensure any storage options present use the domain’s CMK.
Changing the key on an existing domain may not be supported via console; if not, you’d create a new domain using the CMK and migrate workloads.

7. Confirm the Misconfiguration Is Resolved

  • For a training/processing/batch job, open the job details and ensure:
    • KMS key for output data = your CMK.
    • KMS key for volume storage = your CMK.
  • For notebooks and Studio, check the Encryption key field in their respective configuration pages.
  • Optionally, in KMS → Key usage, verify that your CMK is being used by SageMaker.
If you tell me what exact resource the finding is on (training job, notebook, Studio, or batch), I can give a tailored, minimal set of exact console clicks for that specific case.
Below are concise, CLI‑focused steps to ensure SageMaker output and storage are encrypted with KMS Customer Managed Keys (CMKs).

1. Create (or identify) a KMS CMK

If you don’t already have a CMK:
Get the key ID/ARN:
Use the CMK ARN in the following steps, e.g.: arn:aws:kms:<region>:<account-id>:key/<key-id>

2. Encrypt Notebook Instance Storage (EBS)

You cannot modify an existing notebook instance’s KMS key. You must recreate it with --kms-key-id.
  1. Get current notebook config:
Note:
  • InstanceType
  • RoleArn
  • SubnetId / SecurityGroups
  • VolumeSizeInGB
  • DirectInternetAccess, etc.
  1. Stop and delete old notebook:
  1. Recreate with CMK:

3. Encrypt Training Job Output (S3) and Storage (Volumes)

When starting new training jobs, specify:
  • --output-data-config KmsKeyId=<cmk-arn>,S3OutputPath=<s3-uri>
  • --resource-config VolumeKmsKeyId=<cmk-arn>,...
Example:
Existing training jobs cannot be changed; apply this to all future jobs.

4. Encrypt Model Artifacts and Endpoints

4.1 Create Model with KMS Key

If your model artifacts are in S3, create the model with --enable-network-isolation as needed and --primary-container using ModelKmsKeyId for volumes (or use --vpc-config + KMS key for attached volumes):
Model artifacts in S3 should be encrypted with the same CMK via S3 bucket default encryption or per-object encryption:

5. Encrypt Endpoint Storage (Production Variants / Volumes)

When creating or updating an endpoint configuration, specify VolumeSizeInGB and VolumeKmsKeyId in the production variants where supported:
Then create or update the endpoint:
For existing endpoints, create a new endpoint config with VolumeKmsKeyId and:

6. Verify Encryption

  • Notebook:
  • Training job output/storage:
  • S3 bucket:
Apply these patterns to all new SageMaker notebooks, training jobs, models, and endpoints to meet the “Output and Storage Data Encrypted With KMS CMKs” requirement.
To remediate this finding, you need to ensure all SageMaker artifacts (notebooks, training jobs, models, endpoints, processing jobs, etc.) use KMS customer-managed keys (CMK) instead of AWS‑managed or unencrypted storage.Below are concise, step‑by‑step instructions with Python/boto3.

1. Prerequisites


2. Create or identify a KMS CMK

If you don’t already have a CMK for SageMaker:
Or use an existing CMK ID/ARN:
Make sure the CMK key policy allows SageMaker and your IAM principals to use it (kms:Encrypt, kms:Decrypt, kms:GenerateDataKey, etc.).

3. Encrypt SageMaker Notebook Instances

New notebook:
Existing notebook (must stop first; some settings are immutable, so recreate if needed):
If update fails (field immutable), create a new notebook with KmsKeyId and migrate.

4. Encrypt Training Jobs (output, model artifacts & volume)


5. Encrypt Models and Endpoints

Model (stores container settings & model data location):
For endpoints, ensure the endpoint configuration uses volumes with KMS:

6. Encrypt Processing Jobs


7. Encrypt Pipelines (Pipeline Execution Storage)

When creating/updating pipelines, specify PipelineDefinitionS3Location with a bucket encrypted by your CMK, and for each step (training, processing, transform, etc.), pass KmsKeyId/VolumeKmsKeyId/OutputDataConfig.KmsKeyId as above.If you use the SageMaker Python SDK (sagemaker library), most high‑level classes (Estimator, ProcessingJob, Transformer, etc.) accept output_kms_key, volume_kms_key, or encrypt_inter_container_traffic parameters that map to the same fields.

8. Verify Encryption

Use describe_* calls to confirm KmsKeyId and VolumeKmsKeyId are set:
Repeat for notebooks, processing jobs, endpoints, data capture, etc.
If you tell me exactly which SageMaker resource (notebook, training job, endpoint, processing job, pipeline) your security tool flagged, I can give a focused Python snippet tailored to that specific type.