Amazon Bedrock で Converse API の呼び出しに必要な権限を教えてください
困っていた内容
Amazon Bedrock で Converse API を使ってモデルを呼び出したいです。
最小権限で許可したいのですが、定義済みアクションに「Converse」がありません。必要な権限を教えてください。
どう対応すればいいの?
bedrock:InvokeModelアクションを許可してください。
This operation requires permission for the bedrock:InvokeModel action.
Converse API を使用するには、ConverseではなくInvokeModelアクションの許可が必要で、API 名とは異なるため注意してください。
なお、InvokeModelアクションが許可されていない場合、エラーメッセージにはInvokeModelの許可が必要である旨が表示されます。
$ aws bedrock-runtime converse \
--model-id jp.anthropic.claude-sonnet-4-6 \
--messages '{
"role": "user",
"content": [{
"text": "こんにちは"
}]
}'
aws: [ERROR]: An error occurred (AccessDeniedException) when calling the Converse operation: User: arn:aws:iam::123456789012:user/cm-hato is not authorized to perform: bedrock:InvokeModel on resource: arn:aws:bedrock:ap-northeast-1:123456789012:inference-profile/jp.anthropic.claude-sonnet-4-6 because no identity-based policy allows the bedrock:InvokeModel action
参考資料
Converse API を使用するには、Converse または ConverseStream オペレーションを呼び出してモデルにメッセージを送信します。Converse を呼び出すには、bedrock:InvokeModel オペレーションを呼び出す許可も必要です。ConverseStream を呼び出すには、bedrock:InvokeModelWithResponseStream オペレーションを呼び出す許可も必要です。
このAPIを利用するためには、以下の権限が必要となります
- bedrock:InvokeModel
- bedrock:InvokeModelWithResponseStream。







