- Newest
- Most votes
- Most comments
Below is the consideration on how to make this work:
- Use a VPC with S3 VPC Endpoint • Create a Gateway VPC endpoint for S3 in the same VPC and subnet as your SageMaker job • Ensure the route table for the subnet includes the S3 endpoint • No NAT gateway or internet access is needed
- Don’t Expect the Container to Access S3 • The container itself cannot make boto3 or curl calls to S3 • Instead, SageMaker downloads input data and model artifacts to the container’s local storage before execution • Similarly, output artifacts are uploaded by SageMaker, not the container
- Use Input/Output Channels Properly • Define InputDataConfig and OutputDataConfig in your training or inference job • SageMaker handles the S3 interaction outside the container using its own managed network path
- Avoid VpcConfig for Inference if Not Needed • If you specify VpcConfig, SageMaker won’t create the second ENI for S3 access, and you must ensure the container has access to S3 via the VPC
Hey,
Hope you're keeping well.
Yes, it’s feasible, but with network isolation enabled the container itself cannot directly call S3 APIs. SageMaker handles S3 transfers outside the container by downloading your model artifacts and input data to the container’s local storage before execution, and uploading outputs after completion. To make this work in a VPC, attach a Gateway VPC endpoint for S3 to the same subnets used by the SageMaker job and ensure the route tables include it. Then configure your job’s InputDataConfig and OutputDataConfig to point to the desired S3 locations so SageMaker can perform the transfers without requiring internet access.
Thanks and regards,
Taz
answered 8 months ago
Relevant content
asked 4 years ago
asked 6 years ago

Thanks, I appreciate the explanation.