Skip to main content

๐Ÿ›ก๏ธ AWS SageMaker Endpoint Config does not specify a KMS key๐ŸŸข

  • Contextual name: ๐Ÿ›ก๏ธ Endpoint Config does not specify a KMS key๐ŸŸข
  • ID: /ce/ca/aws/sagemaker/endpoint-config-encryption-with-kms
  • Tags:
  • Policy Type: COMPLIANCE_POLICY
  • Policy Categories: SECURITY

Logicโ€‹

Similar Policiesโ€‹

Descriptionโ€‹

Open File

Descriptionโ€‹

This policy identifies AWS SageMaker Endpoint Configurations that do not use an AWS KMS customer-managed key (CMK) for storage encryption.

Rationaleโ€‹

By default, the storage volume for a SageMaker endpoint is encrypted with a temporary, Amazon-managed key. Using a customer-managed KMS key provides an additional layer of security and control. It enables you to manage the key lifecycle, define access policies, and audit key usage, which is critical for protecting sensitive machine learning models and associated data.

Auditโ€‹

This policy flags an AWS SageMaker Endpoint Configs as INCOMPLIANT if the KMS Key ID field is empty.

Remediationโ€‹

Open File

Remediationโ€‹

Enable Encryption for SageMaker Endpoints Using Customer-Managed KMS Keysโ€‹

Existing SageMaker endpoint configurations cannot be directly modified to add encryption. To enable encryption with a customer-managed KMS key, create a new endpoint configuration with the desired KMS key and update the endpoint to use it.

From Command Lineโ€‹
  1. Retrieve the existing endpoint configuration to obtain the ProductionVariants details.

    Save the ProductionVariants array to a file named production-variants.json:

    aws sagemaker describe-endpoint-config \
    --endpoint-config-name {{old-config-name}} \
    --query 'ProductionVariants' \
    --output json > production-variants.json

    Example production-variants.json content:

    [
    {
    "VariantName": "AllTraffic",
    "ModelName": "model-name",
    "InitialInstanceCount": 1,
    "InstanceType": "ml.t2.medium",
    "InitialVariantWeight": 1.0
    }
    ]
  2. Create a new endpoint configuration with the KMS key:

... see more

policy.yamlโ€‹

Open File

Linked Framework Sectionsโ€‹

SectionSub SectionsInternal RulesPoliciesFlagsCompliance
๐Ÿ’ผ AWS Well-Architected โ†’ ๐Ÿ’ผ SEC08-BP02 Enforce encryption at rest14no data
๐Ÿ’ผ Cloudaware Framework โ†’ ๐Ÿ’ผ Data Encryption54no data