Skip to main content

More Info:

Ensure Sagemaker notebook instance has KMS key configured

Risk Level

High

Address

Security

Compliance Standards

  • APRA CPS 234 (Australia)
  • AWS Startup Security Baseline
  • 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)
  • Essential 8
  • HIPAA
  • ISO 27001
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST CSF
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • PCI
  • Reserve Bank of India (RBI) Cyber Security Framework
  • SWIFT Customer Security Controls Framework
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Using Console

  1. Log in to the AWS Management Console:
    • Open the AWS Management Console and navigate to the SageMaker service.
  2. Create a New Notebook Instance:
    • Click on “Create notebook instance.”
  3. Configure Notebook Instance:
    • Fill in the “Notebook instance name,” “Notebook instance type,” and other required fields.
  4. Configure Encryption:
    • Scroll down to the “Encryption settings” section.
    • Under “KMS key,” select an existing KMS key from the dropdown or enter the KMS key ID manually.
  5. Create the Notebook Instance:
    • After configuring all necessary settings, click on “Create notebook instance.”
To create a SageMaker notebook instance with a specified KMS key, you can use the following CLI command:
Replace the placeholders (<YourNotebookInstanceName>, <InstanceType>, <IAMRoleARN>, <KMSKeyID>, <VolumeSize>, <CodeRepositoryURL>, and <AdditionalCodeRepositories>) with appropriate values.
To create a SageMaker notebook instance with a specified KMS key using a Python script, you’ll need the boto3 library:
  1. Install boto3 (if not already installed):
  1. Script to Create a Notebook Instance:
Replace the placeholders (<YourNotebookInstanceName>, <InstanceType>, <IAMRoleARN>, <KMSKeyID>, <VolumeSize>, <CodeRepositoryURL>, and <AdditionalCodeRepositories>) with appropriate values.
Changing kms_key_id on an existing aws_sagemaker_notebook_instance causes Terraform to perform an in‑place update that mirrors the CLI sequence (stop → update → start), resulting in a temporary service interruption but not a resource replacement.Ensure the SageMaker execution role attached to this notebook instance has permissions on the specified KMS key (for example kms:CreateGrant, kms:Encrypt, kms:Decrypt).Verification: terraform plan should show an in‑place update of aws_sagemaker_notebook_instance.THIS_NOTEBOOK with kms_key_id changing from null (or the old key) to "KMS_KEY_ID_OR_ARN".