Bedrock and AI Agent auth problem

Describe the problem/error/question

Im trying to use n8n AI Agent with aws bedrock model but im getting a error that models dont load:

What is the error message (if any)?

There`s no error message

Please share your workflow

Share the output returned by the last node

My credentials seems ok:

And i have bedrock full access on those keys

Information on your n8n setup

  • n8n version: 1.82.3
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npx
  • Operating system: Windows 11

Hey, AWS is my thing :sunglasses:

Check this out — if your credentials are all good and you’ve got full access to Bedrock, the issue might be one of these:

Have you tried this?

  1. Activate the models in the AWS Bedrock Console
    Even with full access, some models (like Claude, Jurassic, Titan, etc.) need to be manually activated per account. Go to the Bedrock Console and make sure the models are enabled for use.

  2. Double-check IAM permissions
    Sometimes “full access” doesn’t include everything the SDK needs. Make sure your user or role has the following permissions:

    • bedrock:ListFoundationModels
    • bedrock:InvokeModel
    • bedrock:InvokeModelWithResponseStream
  3. Confirm the correct region in n8n
    us-east-1 is the right region for Bedrock, but if there’s any mismatch between the region in your AWS setup and the n8n node, it might fail to load the models.

  4. Reload the model dropdown
    Occasionally, the dropdown just freezes. Try reopening the workflow, refreshing the browser tab, or even restarting n8n (especially if you’re running it locally or via npx).

If everything on the AWS side looks good, this might be a bug in n8n. I’ve seen a few reports recently with Bedrock integration issues in newer node versions.

If you want, I can send you a quick example using the HTTP node to call Bedrock directly while the bug gets sorted out.

Happy to dig deeper with you if needed.

– Dandy

Hello Dandy

i pass the last week trying that and everything looks ok:

1 - The model is activated and the account have access to that models (im using claude sonnet 3.5)

2 - In the beggining i was using the full access to the model and change to granular singular permissions

3 - yep same region

4 - i was using via docker and thought that could be a port problem and isolation of network, and change to npx.

no success, unfortunattly, i move to ollama and worked just fine, my only problem is with bedrock, and i would like to use that :confused:

I am available to investigate further together :slight_smile:

Alright, let’s dig into this mystery.

If everything you tested is really solid (model activated, correct permissions, right region, no network isolation), then it might be something specific with how n8n integrates with Bedrock’s SDK especially with Claude 3.5.

Here’s something that might help us isolate the issue:
Try calling the Bedrock API directly using an HTTP Request Node, outside the AI Agent flow. That way we can tell if the problem is with the Agent node or with access itself.

Basic example call:

URL: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-sonnet-20240229/invoke

Headers:

{
“Content-Type”: “application/json”,
“X-Amz-Target”: “AmazonBedrockRuntime.InvokeModel”,
“Authorization”: “Bearer YOUR_TOKEN_HERE”
}

Body:

{
“prompt”: “You are a helpful assistant.”,
“max_tokens_to_sample”: 300
}

If this works directly through the HTTP node, then we know the issue is with the Agent node or something in the way it parses the model.
If it still fails, then yeah it might be something deeper on the AWS side.

Let me know if that worked.