[BUG] Claude Code Not Switching to AWS Bedrock
Status Fixed / completed
Maintainer reply ✓ Yes — ant-kurt
Activity 6 comments · opened Aug 12, 2025 · closed Aug 12, 2025
💡 Likely answer: A maintainer (ant-kurt, collaborator)
responded on this thread — see the highlighted reply below.
Environment
- Platform (select one):
- [ ] Anthropic API
- [x] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.76 (Claude Code)
- Operating System: macOS 15.6
- Terminal: Panic Prompt / Panic Nova + fish shell
Bug Description
Claude Code Will Not Switch to AWS Bedrock
Steps to Reproduce
mzagaja@TED-MBP-MZAGAJA ~/D/ai-reference> claude --version
1.0.76 (Claude Code)
mzagaja@TED-MBP-MZAGAJA ~/D/ai-reference> echo $CLAUDE_CODE_USE_BEDROCK
1
mzagaja@TED-MBP-MZAGAJA ~/D/ai-reference> echo $AWS_REGION
us-east-1
mzagaja@TED-MBP-MZAGAJA ~/D/ai-reference> claude -p 'Are you using AWS bedrock?'
No, I'm running through Anthropic's Claude API, not AWS Bedrock. Claude Code does support AWS Bedrock integration if you want to configure it to use Bedrock instead.
Expected Behavior
I expected Claude Code to use AWS Bedrock after set CLAUDE_CODE_USE_BEDROCK 1.
Actual Behavior
Claude Code used my Anthropic account.
6 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Check
/statusto see if the Bedrock connection info is displayed. Also consider running withANTHROPIC_LOG=debugto confirm your requests are indeed hitting Anthropic and not Bedrock.Appreciate the hint on
/statusI would say it is likely this has to do with Claude Code not properly seeing/inspecting the environment in fish shell. If I switch to zsh:
It works. This was not broken the other day, so I think its potentially a regression in newest update.
Just double-checking, can you confirm that you exported your env var via
set -x CLAUDE_CODE_USE_BEDROCK 1? We don't do anything special around environment variable loading, which typically means the variable is not exported / visible to child processes likeclaude.Also, consider using a settings.json.
Ah, I was merely doing
set CLAUDE_CODE_USE_BEDROCK 1so-xseems to be significant here. Thanks for having me check that.This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.