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

What this check verifies

SageMaker training jobs are evaluated for VPC configuration by detecting defined subnets in the job settings. With VPC settings, ENIs place the job in your VPC so traffic for training volumes and outputs uses private networking.

Risk

Without VPC settings, training containers rely on public networking and broad egress. This weakens confidentiality and integrity, enabling data exfiltration of datasets or model artifacts, malware downloads, and bypass of granular security group controls and VPC-based monitoring.

Recommendation

Run training in a VPC using specific subnets and tightly scoped security groups.
  • Use VPC endpoints for S3, ECR, and SageMaker to keep traffic private
  • Block outbound Internet by default and allow only required destinations
  • Apply network segmentation and, when feasible, enable network isolation

Remediation

# SageMaker Training Job with VPC configuration
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
  }

  vpc_config {
    subnets            = ["<example_resource_id>"]     # CRITICAL: enables VPC on the training job
    security_group_ids = ["<example_resource_id>"]     # Required with VPC
  }
}

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_vpc_settings_configured. 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