Skip to content

Issue with Bedrock Agents and Lambda Function – Model Timeout/Error

4

Hello everyone,

I started exploring Bedrock Agents with the new Amazon Nova models a week ago.

I added a Lambda function to an action group. However, when I try to ask a question that triggers the Lambda function, I receive the following error:

"Dependency resource: received model timeout/error exception from Bedrock. Try the request again." error from aws console

Interestingly, when I use Anthropic Claude 3.5 Sonnet, Haiku 3.5, or Titan Text G1 Express, I don’t encounter this issue.

Has anyone else experienced this? Any insights on how to resolve it?

Thanks!

asked 2 years ago5.2K views

6 Answers
5
Accepted Answer

I got stuck with this error for a long time before I finally figured out my issue. I had a hyphen in my action group name. As soon as I replaced the hyphen with something like a underscore, it started working as expected.

Wrong:

agent-action-group

Correction:

agent_action_group

My guess is that its connected to the toolSpec.name which has a regex that does not allow hyphens. https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ToolSpecification.html

There is no clear error message about this, either in Bedrock or the Model invocation logs, which would have saved me alot of time and headache.

answered a year ago

  • This worked for me . Have no clue why that works

2

remove any "-" (Hyphens) in the action group name

AWS

answered a year ago

1

Same issue with Nova Pro. Replace "-" by "_" in the action group name doesn't help to fix the issue.

answered a year ago

0

Same problem here. Also with Nova Micro.

answered a year ago

0

We are having the same error. We don't have any further information to investigate this error.

Used model: Amazon Nova Lite 1.0

  • Model Invocation logs are not showing anything related to this error.
  • LambdaFunction is not being invoked yet, so no error logs.
  • Invoking the Agent without an action group will not cause this error.

It's somehow when the agent is trying to invoke the LambdaFunction.

Any help?

answered a year ago

-4

I apologize for the inconvenience you're experiencing with Bedrock Agents and the Amazon Nova models. This error suggests there might be an issue with the model's response time or availability when working with the Lambda function in your action group.

Since you mentioned that other models like Claude 3.5 Sonnet, Haiku 3.5, and Titan Text G1 Express are working fine, it appears the problem might be specific to the Amazon Nova models' integration with Bedrock Agents.

Here are a few steps you can try to troubleshoot and potentially resolve the issue:

  1. Double-check that you have the necessary permissions set up correctly for both the Bedrock Agent and the Lambda function. Ensure that the Bedrock Agent has permission to invoke the Lambda function.

  2. Review your Lambda function's execution time and make sure it's not exceeding the timeout limit. You may need to increase the timeout if the function is taking longer than expected.

  3. Verify that your AWS SDK version is up-to-date, as older versions might not fully support newer features or models.

  4. Check if there are any known issues or limitations with using Amazon Nova models in Bedrock Agents. You may want to consult the AWS documentation or reach out to AWS support for the most up-to-date information.

  5. Try implementing more extensive logging in your Lambda function to gather more information about where the timeout or error might be occurring.

  6. As a workaround, you could try using one of the models that are working correctly (like Claude 3.5 or Titan) for your agent while the issue with Nova models is being investigated.

If the problem persists after trying these steps, it would be advisable to open a support ticket with AWS to get more specific assistance with the Amazon Nova models and Bedrock Agents integration.
Sources
Error when Bedrock agent invoke lambda | AWS re:Post
Error raised while calling invoke agent operation | AWS re:Post

answered 2 years ago

EXPERT

reviewed 2 years 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.