Choosing private subnet for SageMaker model deployment

0

Below is the infra config:

  • 1 VPC with 2 private subnets
  • VPC endpoints configured only to 1 private subnet, say primary subnet (for cost optimization)
  • SageMaker domain configured with same VPC and only the primary subnet
  • All SageMaker jobs containers use the same primary subnet

Issue: SageMaker model deployment function requires 2 private subnets to be provided in the VPC config parameter. We can provide both the subnets under the VPC but want to enforce that the model deployment happens in primary subnets only. Is there a way to provide the preferred subnet id?

Will the below options work:

  • Configure CIDR for secondary subnet in such a way that no more than 1 IP is available and SageMaker can determine the same and do the model deployment in primary subnet only?
  • In the VPC config input parameter, provide the subnets id in the preferred order and SageMaker always picks the first id in the subnets list of the input parameter?

Note: Achieving HA during failover/DR is not necessary here as these model deployments are for trial purposes only.

Thanks.

kalmesh
已提問 2 個月前檢視次數 638 次
1 個回答
0

It seems like SageMaker doesn't let you pick and choose exactly which subnet to use when you've got multiple ones for your deployments. While it's not ideal, SageMaker decides which subnet to deploy based on its internal logic, primarily for availability and operational efficiency.

Unfortunately, there's no straightforward way to specify a "preferred" subnet directly in the setup. People usually just provide a list of subnets, and SageMaker works out the rest. It might seem a bit limiting, especially when you're trying to control your deployment environments closely.

One thing you might think about (though it's a bit of a hack and comes with its own risks) is adjusting the available IPs in your secondary subnet. But, this approach is like walking a tightrope without a net – it's tricky and could lead to other problems.

profile picture
專家
已回答 2 個月前
profile picture
專家
已審閱 1 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南