More Info:
Sagemaker Domains should have VPC only network access enabledRisk Level
MediumAddress
Monitoring, SecurityCompliance Standards
- APRA CPS 234 (Australia)
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- DPDPA
- Digital Operational Resilience Act (EU)
- ISO 27001
- ISO/IEC 27018
- ISO/IEC 27701
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- SOC2
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
To enforce VPC-only network access for SageMaker Domains, you must use a VPCOnly domain. The network access type cannot be changed on an existing domain, so you’ll create a new domain with VPCOnly and migrate users.
1. Check existing SageMaker Domain(s)
- Sign in to AWS Console.
- Go to Amazon SageMaker.
- In the left menu, choose Admin configurations → Domains (or SageMaker Studio → Domains, depending on console version).
- For each domain, check:
- Network access type (e.g.,
PublicInternetOnlyorVPCOnly). - Region (you’ll recreate in the same Region).
- VPC, subnets, security groups, and execution roles in use.
- Network access type (e.g.,
VPCOnly, plan to replace it.2. Prepare networking for VPC-only access
You need a VPC with subnets and security groups that meet Studio requirements.- In the console, go to VPC.
- Either:
- Use an existing VPC, or
- Create a new VPC:
- Choose Create VPC → VPC and more.
- Provide a name, IPv4 CIDR, and at least two private subnets (recommended).
- Ensure:
- Private subnets have outbound access to AWS services as required (via NAT Gateway and route tables, or VPC endpoints).
- (Recommended) Add VPC endpoints (Interface/ Gateway) for:
com.amazonaws.<region>.sagemaker,sts,logs,ecr.api,ecr.dkr,s3(Gateway), etc., depending on what Studio needs to reach without public internet.
- Create or identify a security group to associate with the domain:
- Outbound: allow required egress (e.g., to S3, SageMaker, etc., via endpoints / NAT).
- Inbound: typically no inbound from the internet; inbound from load balancer/endpoints as needed.
3. Create a new SageMaker Domain with VPC-only access
- Go to Amazon SageMaker → Admin configurations → Domains.
- Click Create domain.
- Choose Domain type (e.g., SageMaker Studio or Studio Classic, depending on what you use).
- In Authentication:
- Choose AWS IAM or SSO according to your environment.
- In Network and storage (names may differ slightly by console version):
- Network access type: select VPC Only.
- VPC: choose the prepared VPC.
- Subnets: choose at least one (preferably multiple) private subnets.
- Security groups: select your security group(s).
- In Execution role:
- Use an existing SageMaker execution role or create a new one with appropriate IAM permissions.
- Configure Default user settings (app types, storage, lifecycle configs, etc.).
- Review all settings and click Create domain.
- Wait until the new domain status is InService.
4. Migrate users / projects to the VPCOnly domain
Because you can’t change the network access type in-place, you need to move usage from the old domain to the new VPCOnly domain:- For each user:
- Export or copy important notebooks, code, and data from the old domain (e.g., to S3).
- In the new VPCOnly domain:
- Create User profiles matching the previous users (if using IAM, map to IAM users/roles as needed).
- Have users open SageMaker Studio from the new domain and restore their notebooks/projects from S3 or version control.
- Validate:
- Users can access required data (S3, Git, etc.) through VPC endpoints or internal paths.
- No direct access relies on public internet from Studio kernels unless explicitly allowed via NAT, if that’s part of your design.
5. Decommission non-compliant (non-VPCOnly) Domain
After successfully migrating:- Ensure no active workspaces/apps are needed in the old domain.
- Back up any remaining data to S3.
- In the SageMaker console, go to Admin configurations → Domains.
- Select the old domain (with
PublicInternetOnlyor mixed access). - Choose Delete domain (optionally delete associated user profiles and apps, depending on prompts).
- Confirm deletion.
Using CLI
Using CLI
Below are the concrete AWS CLI steps to enforce VPC-only network access for an existing SageMaker Domain.
Note the
Inspect
This instructs SageMaker to restrict apps to VPC-only network paths.You can optionally wait for the update to complete:Wait until you see
You should now see:
These steps remediate the “SageMaker Domains should have VPC only network access enabled” issue using AWS CLI.
1. Prerequisites
You must already have:- A VPC with:
- Private subnets for SageMaker (no direct Internet gateway route)
- Appropriate route tables (e.g., to a NAT gateway or no Internet at all)
- Security groups allowing required traffic inside the VPC
- (Recommended) VPC endpoints:
sagemaker.api,sagemaker.runtime,s3,sts,ecr.api,ecr.dkr,logs, etc. depending on your use case
VpcOnly if the Domain is not configured with VPC details.2. Identify your SageMaker Domain
DomainId you want to fix (e.g. d-xxxxxxxxxx) and confirm AppNetworkAccessType is PublicInternetOnly.3. Get current Domain configuration (for reference)
domain-current.json to confirm:VpcIdSubnetIdsSecurityGroupIds- Current
AppNetworkAccessType(likelyPublicInternetOnly)
4. Update Domain to VPC-Only
Run:InService again.5. Verify the change
AppNetworkAccessType=VpcOnlyStatus=InService
6. (Recommended) Validate connectivity from within VPC
From a notebook or app in the Domain, validate it can still:- Access required AWS services over VPC endpoints (e.g.,
aws s3 lsto S3 buckets, call SageMaker APIs, etc.) - Reach any private data sources reachable within your VPC
- Route tables for the subnets used by the Domain
- Security group rules
- Presence and configuration of required VPC endpoints
These steps remediate the “SageMaker Domains should have VPC only network access enabled” issue using AWS CLI.
Using Python
Using Python
Below are the concrete steps and Python code to enforce VPC-only network access on an existing SageMaker Domain using
Pick the If it is
This triggers an update of the domain. Studio may briefly be unavailable while the change applies.
You should see:
Running this script will remediate the misconfiguration by enforcing VPC-only network access on the specified SageMaker Domain.
boto3.1. Prerequisites
- You have
boto3installed: - Your AWS credentials and region are configured (via environment variables, AWS CLI, or config files).
- Your IAM principal has permissions such as:
sagemaker:DescribeDomainsagemaker:UpdateDomain
2. Understand What Needs to Be Changed
SageMaker Studio domains have a property:AppNetworkAccessType:"PublicInternetOnly"(insecure for this requirement)"VpcOnly"(what you need)
UpdateDomain to set AppNetworkAccessType="VpcOnly".3. Identify Your Domain and Check Current Setting
DomainId you want to remediate, then:"PublicInternetOnly", you need to change it.4. Build the Update Payload
UpdateDomain requires you to pass all DefaultUserSettings you care about, not just the field you’re changing. A safe approach is to:- Read the existing
DefaultUserSettingsfromDescribeDomain. - Reuse them when calling
UpdateDomain. - Add
AppNetworkAccessType="VpcOnly"at the top level of the call.

