All checks
Medium SageMaker · regional

SageMaker monitoring schedules should have network isolation enabled

Flags Amazon SageMaker monitoring schedules whose underlying job definition has NetworkConfig.EnableNetworkIsolation disabled. The schedule inherits the network configuration of either an inline MonitoringJobDefinition or a referenced external job definition.

service
SageMaker
severity
Medium
scope
evaluated in every region

How to fix it

Turn network isolation on for the monitoring job this schedule runs. On a schedule carrying an inline MonitoringJobDefinition, NetworkConfig.EnableNetworkIsolation sits inside it and updating the schedule sets it; if that update is refused, a replacement schedule reaches the same end state. On a schedule that names a job definition instead, the setting is on that definition, which cannot be updated at all: correct it under a new name and repoint the schedule. Isolation is absolute, so the container makes no outbound call and gets no AWS credentials, and anything it fetches for itself stops; SageMaker's own S3 transfers run outside it and still work.

With Terraform

resource "aws_sagemaker_monitoring_schedule" "this" {
  monitoring_schedule_config {
    monitoring_type = var.monitoring_type

    monitoring_job_definition {
      role_arn = var.role_arn

      monitoring_app_specification {
        image_uri = var.monitor_image_uri
      }

      monitoring_inputs {
        endpoint_input {
          endpoint_name = var.endpoint_name
          local_path    = var.input_local_path
        }
      }

      monitoring_output_config {
        monitoring_outputs {
          s3_output {
            local_path = var.output_local_path
            s3_uri     = var.report_s3_uri
          }
        }
      }

      monitoring_resources {
        cluster_config {
          instance_count    = var.instance_count
          instance_type     = var.instance_type
          volume_size_in_gb = var.volume_size_in_gb
        }
      }

      network_config {
        enable_network_isolation = true
      }
    }
  }
}

See which of your accounts this check is failing on.

Book a demo