7
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

BedrockでモデルIDが合っているのに「The provided model identifier is invalid」と出てしまう

7
Last updated at Posted at 2025-12-25

TL;DR

  • モデルIDが合っている時の The provided model identifier is invalid エラーは、リージョンの指定ミスの可能性がある
  • リージョンを、そのクロスリージョン推論の地域にすると解決する

はじめに

こんにちは!株式会社Relic 所属の 2025 Japan AWS Jr. Champion エンジニア、エイミ/amixedcolor です!(𝕏はこちら)

今回、ちょっとした開発で凡ミスに遭遇しましたが、エラーメッセージから即座に原因を断定できず、Web上を検索しても回答が見つからなかったので、自分と同じような誰かのためにも、ちょっとしたことですがペンを手に取りました。

状況(一般化)

Bedrock SDKを使用しようとしていると、 The provided model identifier is invalid というエラーが出る。

モデルIDは正しく指定していて、 Invocation of model ID <modelId> with on-demand throughput isn’t supported. Retry your request with the ID or ARN of an inference profile that contains this model. といったエラーは出ていない。

解決策(一般化)

リージョンを確認し、そのモデルIDの地域のリージョンにする。

実際の経緯

とあるアプリVibeコーディングで作っていて、指定したモデルIDで以下のエラーが出ました。

Invocation of model ID anthropic.claude-sonnet-4-5-20250929-v1:0 with on-demand throughput isn’t supported. Retry your request with the ID or ARN of an inference profile that contains this model.

その時指定していたのはエラーの通りですが、
anthropic.claude-sonnet-4-5-20250929-v1:0 です。

これを解決するために、モデルIDを、
jp.anthropic.claude-sonnet-4-5-20250929-v1:0 に変更しました。

すると、そのエラーは解消しましたが、代わりに以下のエラーになりました。

The provided model identifier is invalid

モデルIDが違うとのことで、調査しましたが、一言一句合っていそうでした。
ここでふと、運良くリージョンが us-east-1 であることに気づきました。

もしやと思い、このクロスリージョン推論は jp と付くように日本用ですが、日本の地域のリージョンである、 ap-northeast-1 に差し替えたところ、成功しました。

おわりに

今回の学びは、エラー内容は変更点だけでなく、もともと存在した状況まで加味して発生する ということでした!

直近変更した部分だけでなく、関連する他の部分で、影響がありそうなものを調べてみると、類型の解決に繋がりそうです。

ここまでお読みいただきありがとうございました!
エイミでした。それでは、またこんど!

7
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?