

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 讓 SageMaker AI 可以存取 Amazon VPC 中的資源
<a name="infrastructure-give-access"></a>

SageMaker AI 預設會在 Amazon Virtual Private Cloud 中執行下列任務類型。
+ 處理
+ 培訓
+ 模型託管
+ 批次轉換
+ Amazon SageMaker Clarify
+ SageMaker AI 編譯

不過，這些任務的容器會透過網際網路存取 AWS 資源，例如存放訓練資料和模型成品的 Amazon Simple Storage Service (Amazon S3) 儲存貯體。

為了控制對您的資料與任務容器的存取，建議您建立一個私有 VPC，並設定為無法經由網際網路存取。如需 VPC 在建立和設定方面的資訊，請參閱 *Amazon VPC 使用者指南*中的 [Amazon VPC 入門](https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/getting-started-ipv4.html)的相關文章。VPC 可設為不連線到網際網路，因此使用您的 VPC 有助於保護您的任務容器和資料。還可使用 VPC 流量日誌，以 VPC 監控所有傳出傳入任務容器的網路流量。如需詳細資訊，請參閱 *Amazon VPC 使用者指南*中的 [VPC 流量日誌](https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/flow-logs.html)。

在建立任務時，可指定子網路和安全群組，便能進行您的私有 VPC 組態。當您指定子網路和安全群組時，SageMaker AI 會在其中一個子網路內建立與安全群組建立關聯的*彈性網路介面*。網路介面可讓您的任務連線至您的 VPC 內的資源。如需有關網路介面的資訊，請參閱 *Amazon VPC 使用者指南*中的[彈性網路介面](https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ElasticNetworkInterfaces.html)。

您可以在 [CreateProcessingJob](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateProcessingJob.html) 操作或 [CreateTrainingJob](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html) 操作的 `VpcConfig` 物件內指定 VPC 組態。建立訓練任務時指定 VPC 組態可讓您的模型存取 VPC 內的資源。

僅指定 VPC 組態不會變更調用路徑。若要連線到 VPC 內的 Amazon SageMaker AI，請建立 VPC 端點並調用它。如需詳細資訊，請參閱[在您的 VPC 中連線到 SageMaker AI](interface-vpc-endpoint.md)。

**Topics**
+ [讓 SageMaker AI 處理任務可以存取 Amazon VPC 中的資源](process-vpc.md)
+ [讓 SageMaker AI 訓練任務可以存取 Amazon VPC 中的資源](train-vpc.md)
+ [讓 SageMaker AI 託管的端點可以存取 Amazon VPC 中的資源](host-vpc.md)
+ [允許批次轉換任務存取 Amazon VPC 中的資源](batch-vpc.md)
+ [允許 Amazon SageMaker Clarify 任務存取您 Amazon VPC 中的資源](clarify-vpc.md)
+ [讓 SageMaker AI 編譯任務可以存取 Amazon VPC 中的資源](neo-vpc.md)
+ [允許 Inference Recommender 任務存取您的 Amazon VPC 中的資源](inference-recommender-vpc-access.md)