# AWS_BEARER_TOKEN_BEDROCK

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

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** Amazon Bedrock API key

## Think of it like

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

## 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

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.

## 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.

## Why it matters

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

## Common mistake

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

## Three principles

- **One key.** No profile needed.
- **Wins over AWS keys.** When set.
- **Needs USE_BEDROCK.** And a region.

## Related terms

- [CLAUDE_CODE_USE_BEDROCK](https://learn.benibix.com/term/ai/claude-code-use-provider-variables)
- [Amazon Bedrock](https://learn.benibix.com/term/ai/amazon-bedrock)
- [API Key](https://learn.benibix.com/term/development/api-key)

---

Source: https://learn.benibix.com/term/ai/aws-bearer-token-bedrock-variable
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
