CLAUDE_CODE_USE_BEDROCK
Updated by Alex Sorokoletov
CLAUDE_CODE_USE_BEDROCK is a Claude Code environment variable: Use Amazon Bedrock as backend. Present since v2.1.69 or earlier and still present in v2.1.294. It is listed in the official reference.
| Status | Present in v2.1.294 |
|---|---|
| Added | Present since v2.1.69 or earlier |
| Category | Cloud providers |
| Official docs | Listed |
How to set it
For one session, export it in the shell that starts Claude Code:
export CLAUDE_CODE_USE_BEDROCK=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_USE_BEDROCK": "<value>"
}
}Release notes that mention it
- CLAUDE_CODE_ATTRIBUTION_HEADER: Fix Bedrock 400 Errors & Prompt Caching Issues
- 165 Environment Variables in Claude Code 2.1.69 — What Changed in 50 Versions
- claude-code-env-vars-v2-1-215
Related variables
ANTHROPIC_BEDROCK_BASE_URL: Alternative Bedrock endpoint (alias).ANTHROPIC_BEDROCK_MANTLE_BASE_URLANTHROPIC_BEDROCK_REGION_PREFIXANTHROPIC_BEDROCK_SERVICE_TIERAWS_BEARER_TOKEN_BEDROCK: Bearer token for Bedrock authentication.CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_DEFAULTCLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_GUARDCLAUDE_CODE_SKIP_BEDROCK_AUTH: Skip Bedrock authentication.
Frequently asked questions
What does CLAUDE_CODE_USE_BEDROCK do?
Use Amazon Bedrock as backend
Which Claude Code version has CLAUDE_CODE_USE_BEDROCK?
Present since v2.1.69 or earlier and still present in v2.1.294.
How do I set CLAUDE_CODE_USE_BEDROCK?
Export it before starting Claude Code (export CLAUDE_CODE_USE_BEDROCK=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.
All variables, searchable: Claude Code environment variables.