# SageMaker Notebook Direct Internet Access Enabled

> Direct internet access gives a notebook a SageMaker-managed egress path that bypasses your VPC's security groups, NAT, and endpoint policies entirely. ZopNight fires on in-service notebooks whose directInternetAccess reads Enabled; closing the gap means recreating the instance inside a VPC subnet, since the 1 setting is fixed at creation.

Source: https://zop.dev/integrations/aws/recommendations/sagemaker-notebook-direct-internet-access-enabled
Updated: 2026-08-19

---

## The egress path your network team cannot see

With direct internet access enabled, a notebook reaches the internet through a
SageMaker-managed network path: not through your subnets, not through your NAT gateways, not
subject to your security groups or egress inspection. Data on that notebook (and training
data mounted into it) can leave through a door your VPC controls do not cover. For a service
whose whole workload is loading datasets and pulling packages, "egress nobody governs" is the
finding, not a technicality.

## Why remediation is a recreate

Unlike root access, this setting is fixed when the instance is created. Turning it off means
recreating the notebook inside a VPC subnet with direct internet access disabled, then
providing whatever outbound reach users actually need through governed paths: a NAT gateway
for general egress, or VPC endpoints for S3 and the SageMaker APIs when the goal is keeping
traffic on the AWS network entirely. Budget for the migration as user-visible work, since home
directories on the old instance need moving via EBS snapshot or S3.

## What fires and what abstains

The rule reads the discoverer-stamped `directInternetAccess` state and fires only on a
confirmed `Enabled` for an in-service instance. Notebooks in stopped or failed states are
out of scope, and an instance whose describe call failed contributes no finding. Absence of
evidence never reads as exposure.

## Audit the fleet in one pass

```bash
aws sagemaker list-notebook-instances --query 'NotebookInstances[].NotebookInstanceName' --output text \
  | xargs -n1 -I{} aws sagemaker describe-notebook-instance --notebook-instance-name {} \
      --query '[NotebookInstanceName,DirectInternetAccess,SubnetId]' --output text
```

## Pair it with the VPC finding

An instance with direct internet access enabled and no subnet is the fully unmanaged case and
will also trip the not-in-a-VPC rule; the two findings resolve together in one recreation.
Doing the pair properly (private subnet, restrictive security group, S3 and SageMaker API
endpoints, internet access off) produces a notebook whose network posture matches the rest of
your VPC workloads instead of standing outside them.
