InvokeModel call over cross-region

0

Bedrock integration of Step Functions is now supported. Calling Claude 2 in us-west-2 from Step Functions in Tokyo region causes an error. I wonder if cross-region is not supported.

the follwing setup in Bedrock model identifier arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-v2

https://aws.amazon.com/about-aws/whats-new/2023/11/aws-step-functions-optimized-integration-bedrock/

The provided ARN is invalid for the service region (Service: BedrockRuntime, Status Code: 400, Request ID: 78e3a7d3-6284-4a36-8227-88376d71ad3e)

Step function workflow stdio capture

IAM Role Policyはus-west-2のARNを指定するように変更済みです IAM Role

1 Answer
0

Hi s_hiruta,

I am able to reproduce the error you are facing. I did the below testing with a role that has access to all bedrock API calls.

  1. Step function in Tokyo and Bedrock Model in us-east-1: I received the same error as you are getting.

Enter image description here

  1. Step function and Bedrock model in us-east-1: The step function was able to successfully perform the InvokeModel operation.

Enter image description here

Also, if you check the article [1] under “How to get started with Amazon Bedrock and AWS Step Functions” section it specifically mentions that “Before getting started, ensure that you create the state machine in a Region where Amazon Bedrock is available. For this example, use US East (N. Virginia), us-east-1.”

  1. One more observation is that in Step Function Bedrock model identifier selection lists only the models available in that specific region. In the below example only the models from ap-northeast-1 are listed by default.

Enter image description here

So, it looks like step function can only call the InvokeModel API call in the same region where Amazon Bedrock is available.

Article links: [1] https://aws.amazon.com/blogs/aws/build-generative-ai-apps-using-aws-step-functions-and-amazon-bedrock/?trk=f3da5d15-8262-4ccc-b6ac-edb58d9955e7&sc_channel=el

Hope this helps.

AWS
answered 14 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions