Skip to content

Bedrock Agents don't support Nova inference profiles - access denied error

0

Issue: Bedrock Agents fail when using Nova model inference profiles

Steps to Reproduce:

  1. Create agent with foundation_model = "us.amazon.nova-lite-v1:0"
  2. Associate agent with knowledge base
  3. Prepare agent and create alias
  4. Invoke agent via test console or InvokeAgent API

Expected Result: Agent invokes us.amazon.nova-lite-v1:0 successfully

Actual Result: Agent invokes amazon.nova-lite-v1:0 (without prefix), fails with: "Access denied when calling Bedrock"

Evidence: Agent trace shows foundational model "amazon.nova-lite-v1:0"

Workaround: Use Claude models (anthropic.claude-*) which work without inference profiles

Region: us-west-2 Date: December 27, 2024

asked 9 months ago388 views

1 Answer
0

The issue you're experiencing with Bedrock Agents and Nova inference profiles is related to permissions and how the agent is configured to use the model.

When creating a Bedrock Agent that uses Amazon's Nova model, you need to ensure that:

  1. The agent's resource role has the proper permissions to use inference profiles. Specifically, your agent role needs permissions for:
  • bedrock:GetInferenceProfile
  • bedrock:ListInferenceProfiles
  • bedrock:UseInferenceProfile
  • bedrock:InvokeModel
  • bedrock:InvokeModelWithResponseStream
  1. The resource ARN in your permissions should include the inference profile: arn:aws:bedrock:us-west-2:ACCOUNT_ID:inference-profile/*

  2. When specifying the foundation model for your agent, make sure you're using the inference profile ARN rather than just the model ID.

The error "Access denied when calling Bedrock" typically occurs when the agent's role doesn't have the necessary permissions to invoke the model through the inference profile. The fact that the agent trace shows "amazon.nova-lite-v1:0" (without the "us." prefix) suggests that the agent might be trying to invoke the model directly rather than through the inference profile.

For Nova models, you must use an inference profile as they don't support direct on-demand throughput invocations. Your workaround of using Claude models works because some models can be invoked directly without requiring an inference profile.
Sources
CDK - Resource handler returned message: "Access denied for operation 'AWS::Bedrock::Agent'." when creating an agent with foundationModel set as inference-profile. | AWS re:Post
Flow Bedrock: Error Knowledge Bases | AWS re:Post
Error en Lab 1 del curso AWS Generative AI | AWS re:Post

answered 9 months 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.