SageMaker models should have network isolation enabled
Verifies that SageMaker hosted models have network isolation enabled, preventing the model container from making outbound network calls.
- service
- SageMaker
- severity
- Medium
- scope
- evaluated in every region
How to fix it
Set at creation: fixing it means replacing the resource.
Turn network isolation on for the model, so no network call runs in either direction between its inference container and anything else and the container gets no AWS credentials. Check what the container does at run time first: anything that fetches code, a model artifact, a package or a licence check while serving stops working, while the artifact download and output write SageMaker performs itself, outside the container, keep working. There is no update operation for a model, so this means a new model with every endpoint, batch transform job and pipeline step repointed at it. SageMaker requires a model and its endpoint to agree on network isolation, so plan the endpoint move with it.
In the console
SageMaker Studio → Models → Deployable models → Create deployable model → Security → Network isolation
With the AWS CLI
aws sagemaker create-model --model-name <model-name> --execution-role-arn <execution-role-arn> --primary-container '{"Image":"<inference-image-uri>"}' --enable-network-isolation --region <region>With Terraform
resource "aws_sagemaker_model" "this" {
name = var.model_name
execution_role_arn = var.execution_role_arn
enable_network_isolation = true
primary_container {
image = var.inference_image_uri
}
}
See which of your accounts this check is failing on.
Book a demo