Does SageMaker's CreateModel API support model data from versioned S3 objects?

0

In the following AWS CLI invocation, I'm attempting to specify a ModelDataUrl which contains an embedded versionId to reference an object whose bucket has versioning enabled. Does SageMaker's CreateModel API support model data originating from a specific object version? If so, how does one specify the object version?

AWS CLI Invocation:

aws sagemaker create-model --model-name VersionedArtifacts \
  --execution-role-arn arn:aws:iam::<account-id>:role/service-role/<role-name> \
  --primary-container "Image=<account-id>.dkr.ecr.us-east-1.amazonaws.com/<repository>:<tag>,ModelDataUrl=https://s3.us-east-1.amazonaws.com/<versioned-bucket>/versioned-artifacts.tar.gz?versionId=<version-id>

Resulting AWS CLI Error:

An error occurred (ValidationException) when calling the CreateModel operation: Could not find model data at https://s3.us-east-1.amazonaws.com/<versioned-bucket>/versioned-artifacts.tar.gz?versionId=<version-id>.
profile picture
已提問 2 年前檢視次數 227 次
1 個回答
0

I can't rule it out completely as haven't been able to find a source in the docs, but am ~90% sure S3 object versioning is not supported here: Your code makes sense as the only way to try and send through the version parameter, and the missing model data error would make sense if the service is simply trying to read ?versionId=... as part of the key.

I requested further clarification on the ContainerDefinition doc page, but believe you'll need to architect for separate object keys rather than object versions. You'll see that by default the training job API already adds a job-name-specific suffix to your provided output data location, so usually this is only a challenge if you're planning to set up a centralised repository of model.tar.gz in S3 and explicitly copy models into it.

AWS
專家
Alex_T
已回答 2 年前

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

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

回答問題指南