Amazon Bedrock model access can involve cross-region connections. Attempting to register a model from a different region than your current AWS region (for example, US East 1 to US West 2) can trigger an error. This topic will help troubleshoot if you counter that problem.

Prerequisites

  • Amazon Bedrock model access granted: Ensure that the specific models you intend to use have access granted in your environment.
  • Postman or equivalent: Access to Postman or a similar tool to interact with the Custom model creation API.
  • AWS credentials: You should have your AWS credentials (access key and secret key) available to authenticate with Bedrock.
  • Cross-region inference awareness: An understanding of the concept of cross-region inference in Bedrock, where models can be deployed in regions different from the one you are currently operating in.

When attempting to register a model on AWS Bedrock across regions, you can encounter an error message detailing a cross-region access conflict. This error as shown below, includes a userdefined URL and the target model's region, signifies that you are accessing a model outside your current region.The following steps outline how to resolve the error.

Example of the error message:
Custom Model - AWS inference profile error

Procedure

  1. Access cross-region inference: In the AWS Management console, navigate to Amazon Bedrock. Select Inference and Assessment and then Cross-region inference.
  2. Identify the target model:Locate the specific model you intend to register from the list.
  3. Copy inference profile credentials:Within the model's details, copy the Inference profile ID and the Inference profile ARN.
  4. Modify custom model creation API request:In your custom model creation API request:
    1. Set the Inference profile ID as the value for the actions > name parameter.
    2. Set the Inference profile ARN as the value for the actions > uri parameter.Custom Model - AWS inference profile error - Sample

    For more details about the custom model creation API request, see AI Agent Studio API.

  5. Execute the updated request with the modified create custom model request that includes the updated actions > name and actions > uri values.