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

What this check verifies

SageMaker models are evaluated for network isolation status, indicating whether model containers are blocked from initiating network connections during hosting/inference, aside from required service control traffic.

Risk

Disabled network isolation allows model containers to reach external networks, enabling exfiltration of inputs, outputs, or credentials, retrieval of untrusted code, and covert callbacks. This compromises confidentiality and integrity and can facilitate lateral movement from the hosting environment.

Recommendation

Enable network isolation for all hosted models. Run endpoints in a private VPC, restrict egress with tight security groups and VPC endpoints, and enforce least privilege IAM. Adopt defense in depth: avoid public routes, allow-list destinations, and monitor outbound traffic.

Remediation

# SageMaker Model with network isolation enabled
resource "aws_sagemaker_model" "<example_resource_name>" {
  name               = "<example_resource_name>"
  execution_role_arn = "<example_resource_arn>"

  primary_container {
    image = "<example_image>"
  }

  enable_network_isolation = true  # Critical: enables network isolation to pass the check
}

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_models_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