Skip to main content

More Info:

Sagemaker Models should have network isolation enabled

Risk Level

Medium

Address

Monitoring, 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

To enable network isolation for SageMaker models using the AWS Management Console, you must create (or recreate) the model with network isolation turned on. It cannot be enabled on an existing model in-place.Below are step-by-step instructions.

1. Check the existing model (optional)

  1. Sign in to the AWS Management Console.
  2. Go to Amazon SageMaker.
  3. In the left navigation pane, choose InferenceModels.
  4. Click on the model name you want to remediate.
  5. On the Model summary page, check the configuration:
    • If the model was created without network isolation, you will need to create a new model with the same settings and network isolation enabled.

2. Create a new model with Network Isolation enabled

  1. In the SageMaker console, navigate to InferenceModels.
  2. Click Create model.
  3. Model details:
    • Enter a Model name (e.g., my-model-ni-enabled).
    • Optionally add a Description and Tags.
  4. Container:
    • Under Container definition, choose:
      • Either Use an existing container image (for custom images) or
      • Use a SageMaker built-in algorithm (if applicable).
    • Specify:
      • Container image URI.
      • Model artifacts S3 path (e.g., s3://bucket/path/to/model.tar.gz).
    • If using environment variables or container arguments, re-enter them as used in your previous model.
  5. Network Isolation:
    • Find the option that says Network isolation or Enable network isolation.
    • Check or toggle Enable network isolation.
      • This ensures the model container cannot make outbound network calls (only allowed to access its storage volume and input/output for the inference service).
  6. IAM role:
    • Under Permissions, choose an existing SageMaker execution role with access to your model artifacts in S3 (or create a new one).
    • Ensure the role has s3:GetObject for the model artifact location and any other needed permissions.
  7. Review the configuration.
  8. Click Create model.

3. Update endpoints or endpoint configurations to use the new model

If the model is deployed behind an endpoint, you must update the endpoint configuration to point to the new, network-isolated model.

3.1 Create a new endpoint configuration

  1. In the SageMaker console, go to InferenceEndpoint configurations.
  2. Click Create endpoint configuration.
  3. Enter a Name (e.g., my-endpoint-config-ni-enabled).
  4. Under Production variants:
    • Click Add model.
    • Select the new model you just created (with network isolation).
    • Set:
      • Variant name
      • Instance type
      • Initial instance count
      • Initial variant weight as required.
  5. Adjust any other settings (e.g., data capture, async inference) as needed.
  6. Click Create endpoint configuration.

3.2 Update or create the endpoint

  • If you already have an endpoint:
    1. Go to InferenceEndpoints.
    2. Click on your existing endpoint.
    3. Choose Update (or Update endpoint).
    4. Select the new endpoint configuration created above.
    5. Click Update endpoint and wait for the status to become InService.
  • If you don’t have an endpoint yet:
    1. Go to InferenceEndpoints.
    2. Click Create endpoint.
    3. Specify an Endpoint name.
    4. Select the endpoint configuration you just created.
    5. Click Create endpoint and wait until it becomes InService.

  1. Once traffic is confirmed to work through the new endpoint:
    • Delete the old endpoint configuration (if unused).
    • Delete the old model (without network isolation), if no longer needed.
This ensures all active SageMaker models in use have network isolation enabled.
Below are concise, step‑by‑step steps to remediate this using only AWS CLI.

1. Identify SageMaker models without network isolation

Check each model:
If this returns false or null, it needs remediation.

2. Get full configuration of the existing model

You must recreate the model; you cannot “update” network isolation in place.
model-desc.json will look roughly like:

3. Prepare payload for new model with network isolation

Create a new JSON file, e.g. create-model-with-iso.json, keeping everything the same except:
  • Use a new ModelName
  • Add "EnableNetworkIsolation": true
Example:
If your original model used Containers instead of PrimaryContainer, copy that instead.

4. Create the new model with network isolation

Verify:

5. Point existing endpoints / endpoint configs to the new model

5.1 Find endpoint configs that reference the old model

For each:
If the output includes <OLD_MODEL_NAME>, you need a new endpoint config.

5.2 Create a new endpoint config using the new model

Export existing config:
Edit to create create-ec-with-iso.json:
  • Change EndpointConfigName
  • In ProductionVariants, replace ModelName with the new model name.
Example:
Create it:

5.3 Update the endpoint to use the new endpoint config

Wait until the status is InService:

After confirming traffic works as expected:
  • Delete old endpoint configs that are no longer used:
  • Delete old models:

7. Automate for all non‑isolated models (outline)

Script pattern (bash):
This is the required AWS CLI–based remediation: recreate each SageMaker model with EnableNetworkIsolation=true and repoint any endpoint configs/endpoints to the new model.
To enable network isolation on SageMaker models, you must (re)create the model with EnableNetworkIsolation=True. This setting is immutable—you cannot “turn it on” for an existing model in-place. So remediation is:
  1. Identify models without network isolation
  2. Recreate those models with EnableNetworkIsolation=True
  3. (If used in endpoints) create new endpoint configs pointing to the new models and update endpoints
Below is a concise Python/boto3 walkthrough.

1. List models and find ones without network isolation


2. Recreate each model with EnableNetworkIsolation=True

You can clone the existing model definition, add EnableNetworkIsolation=True, and create a new model (recommended: use a new name to avoid endpoint disruption).

3. (If the model is used in endpoints) update endpoint configs

If existing endpoints use the old model, you must:
  1. Create a new endpoint config referencing the new model
  2. Update the endpoint to use the new config
Example:
Tie it together (for one model example):

4. Going forward

When creating any new model, always set:
This ensures the control is satisfied for all future models.