Check ID: sagemaker_training_jobs_network_isolation_enabled
Provider: AWS
Service: sagemaker
Severity: HIGH
Categories: trust-boundaries, gen-ai, internet-exposed
Resource type: Other

What this check verifies

SageMaker training jobs have network isolation enabled, preventing the training container from making any inbound or outbound network calls during execution

Risk

Without network isolation, training code can reach the internet or internal services, enabling:
  • Data exfiltration of datasets and model artifacts
  • Supply-chain compromise via untrusted downloads
  • C2 beacons and resource abuse This harms confidentiality and integrity, and may impact availability.

Recommendation

Enable network isolation for training jobs by default. If network access is required, enforce least privilege and defense in depth:
  • Use private networking and VPC endpoints
  • Restrict egress and narrow IAM permissions
  • Prepackage dependencies to avoid external downloads

Remediation

# SageMaker Training Job with network isolation enabled
resource "aws_sagemaker_training_job" "<example_resource_name>" {
  name     = "<example_resource_name>"
  role_arn = "<example_resource_id>"

  algorithm_specification {
    training_image      = "<example_resource_id>"
    training_input_mode = "File"
  }

  output_data_config {
    s3_output_path = "s3://<example_resource_name>/"
  }

  resource_config {
    instance_type  = "ml.m5.large"
    instance_count = 1
    volume_size_gb = 10
  }

  stopping_condition {
    max_runtime_in_seconds = 3600
  }

  input_data_config {
    channel_name = "training"
    data_source {
      s3_data_source {
        s3_data_type = "S3Prefix"
        s3_uri       = "s3://<example_resource_name>/input/"
      }
    }
  }

  enable_network_isolation = true # Critical: blocks all network access from the training container
}

References

Where this check fires

This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable by Check ID = sagemaker_training_jobs_network_isolation_enabled. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks