Skip to content

fix(examples): make Bedrock model-import job name unique per run#6076

Open
Hannah14295 wants to merge 1 commit into
aws:masterfrom
Hannah14295:fix/bedrock-modelbuilder-unique-import-job-name
Open

fix(examples): make Bedrock model-import job name unique per run#6076
Hannah14295 wants to merge 1 commit into
aws:masterfrom
Hannah14295:fix/bedrock-modelbuilder-unique-import-job-name

Conversation

@Hannah14295

Copy link
Copy Markdown
Contributor

Issue

In v3-examples/model-customization-examples/bedrock-modelbuilder-deployment.ipynb, the OSS-import cell hardcodes job_name="import-llama-finetuned" and imported_model_name="llama-3-8b-finetuned".

Bedrock's CreateModelImportJob requires a unique job name, and completed import jobs cannot be deleted (there is no DeleteModelImportJob API). So running the notebook a second time in the same account/region fails with:

ValidationException ... CreateModelImportJob: The provided job name is currently in use.

This makes the example non-repeatable for anyone who runs it more than once.

Fix

Append an int(time.time()) suffix to both job_name and imported_model_name. time is already imported in the notebook, so the change is minimal.

Testing

  • Notebook JSON validates and the edited cell compiles.
  • Diff is limited to the single OSS-import cell (+3 / -2 lines).

The OSS-import path in bedrock-modelbuilder-deployment.ipynb hardcoded
job_name="import-llama-finetuned" and imported_model_name="llama-3-8b-finetuned".
Bedrock's CreateModelImportJob requires a unique job name, and completed
import jobs cannot be deleted, so running the notebook a second time in the
same account/region fails with "The provided job name is currently in use."

Append an int(time.time()) suffix to both names so the example is repeatable.
time is already imported in the notebook.
@Hannah14295
Hannah14295 force-pushed the fix/bedrock-modelbuilder-unique-import-job-name branch from e9682e6 to 420fea5 Compare July 22, 2026 00:53
@Hannah14295
Hannah14295 deployed to manual-approval July 22, 2026 00:54 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants