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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ