Skip to content
BENIBIX Learn

AWS_BEARER_TOKEN_BEDROCK

AI⌨️ Claude CodeConfiguration

Also known as Amazon Bedrock API key

It gives Claude Code a Bedrock API key to sign in with.

Think of it like

It is like one key card in place of a whole ring of keys.

Example

Lucy wants to try Claude Code on Bedrock today, without setting up an AWS profile. She makes a Bedrock API key and sets this, and it works.

Why it matters

It is the fastest way onto Bedrock, with nothing else to set up.

Definition

AWS_BEARER_TOKEN_BEDROCK gives Claude Code an Amazon Bedrock API key. When it is set, Claude Code signs in with that key alone. It skips the usual AWS sign-in steps, even if other AWS keys are on the machine. It is the short way to try Bedrock with no AWS profile.

Example code

bash
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_BEARER_TOKEN_BEDROCK=your-bedrock-api-key
export AWS_REGION=us-east-1
claude
Sign in to Bedrock with one key.

Common mistake

Leaving it set after you move to a profile. The key still wins over the profile.

Key takeaways

  1. 1
    One key. No profile needed.
  2. 2
    Wins over AWS keys. When set.
  3. 3
    Needs USE_BEDROCK. And a region.