概念 · 基于 SAA-C03
Isolating ML systems with VPCs
Run ML in private subnets, reach AWS services through endpoints, and turn on network isolation where code must not call out.
本课尚未翻译,暂以英文显示。
你在Solutions Architect Associate中已学过
- Security groups are stateful allow rules at the instance. Network ACLs are stateless rules at the subnet.
- VPC Flow Logs record accepted and rejected traffic.
- Reference a security group as a source instead of an IP range.
Private subnet
- Effect
- No public IP
- Use when
- Always for ML resources
VPC-only Studio
- Effect
- No direct internet
- Use when
- Strict notebook control
VPC endpoints
- Effect
- Private path to AWS services
- Use when
- Reach S3, ECR, Bedrock
NAT gateway
- Effect
- Outbound internet
- Use when
- Packages or public APIs
Network isolation
- Effect
- No container network at all
- Use when
- Untrusted code, sensitive data
| Setting | Effect | Use when |
|---|---|---|
| Private subnet | No public IP | Always for ML resources |
| VPC-only Studio | No direct internet | Strict notebook control |
| VPC endpoints | Private path to AWS services | Reach S3, ECR, Bedrock |
| NAT gateway | Outbound internet | Packages or public APIs |
| Network isolation | No container network at all | Untrusted code, sensitive data |
1 / 2
Private subnet
- Effect
- No public IP
- Use when
- Always for ML resources
VPC-only Studio
- Effect
- No direct internet
- Use when
- Strict notebook control
VPC endpoints
- Effect
- Private path to AWS services
- Use when
- Reach S3, ECR, Bedrock
| Setting | Effect | Use when |
|---|---|---|
| Private subnet | No public IP | Always for ML resources |
| VPC-only Studio | No direct internet | Strict notebook control |
| VPC endpoints | Private path to AWS services | Reach S3, ECR, Bedrock |
2 / 2
NAT gateway
- Effect
- Outbound internet
- Use when
- Packages or public APIs
Network isolation
- Effect
- No container network at all
- Use when
- Untrusted code, sensitive data
| Setting | Effect | Use when |
|---|---|---|
| NAT gateway | Outbound internet | Packages or public APIs |
| Network isolation | No container network at all | Untrusted code, sensitive data |
是什么
Put notebooks, training jobs, processing jobs and endpoints in private subnets, and give them security groups that allow only what they need. Studio can run in VPC-only mode: all traffic goes through your VPC, with no direct internet access. You then provide the paths yourself: interface endpoints for the SageMaker API and runtime and other services, and a gateway endpoint for S3. Jobs that you start from Studio do not inherit those VPC settings, so set the subnets and security groups on each job, or enforce them with the IAM condition keys.
是什么
There are two ways out of a private subnet. A NAT gateway gives internet access, for example to install packages or call a public API, but it is billed by the hour and by data, and it is a path for data to leave. VPC endpoints keep traffic on the AWS network: a gateway endpoint for S3, and interface endpoints (AWS PrivateLink) for services such as Bedrock (bedrock-runtime and others), ECR and CloudWatch Logs. An endpoint policy narrows what may pass. Prefer endpoints for AWS services, and use NAT only when you need the internet.
是什么
Network isolation goes further. A training job or model with EnableNetworkIsolation blocks all inbound and outbound network access from the container. SageMaker copies the data in and the output out, so the code cannot send anything to the internet. Use it with untrusted code or sensitive data, and package dependencies in the image beforehand. Turn on VPC Flow Logs to see accepted and rejected connections, which helps to confirm that isolation works.
要记住
- Private subnets and tight security groups for notebooks, jobs and endpoints.
- Studio VPC-only mode: no internet, you add the endpoints.
- Jobs from Studio need their own VPC settings. Enforce with condition keys.
- Endpoints for AWS services. NAT only for the internet.
- PrivateLink for Bedrock, ECR and Logs. Gateway endpoint for S3.
要记住
- Network isolation: no network calls at all from the container.
考试中
- “Notebooks must have no internet access” points to Studio VPC-only mode.
- “Training code must not send data out” points to network isolation.
- “Call Bedrock without using the internet” points to a PrivateLink interface endpoint.
- “Private subnet needs S3 without NAT” points to an S3 gateway endpoint.
别和这些弄混
- Troubleshooting ML security issuesWork out whether a failure is a permission or a network path, then read the error and the CloudTrail event.
- Bedrock access controlIAM decides which models and profiles a caller may invoke. SCPs and a guardrail condition enforce the rules for everyone.
- SageMaker endpoints in a VPCSubnets, security groups and VPC endpoints keep ML traffic off the internet.
本任务内容 · 4.3
- Scanning code and images in CI/CD
- Least privilege for ML artifacts
- IAM roles for SageMaker and ML workloads
- Bedrock access control
- Credential types for Bedrock
- Auditing, logging and compliance for ML
- Troubleshooting ML security issues
- Isolating ML systems with VPCs
- Encryption and data protection for ML
- AI and ML security risks
Guardrails