[BUG] When using Amazon Bedrock, a 403 error occurs and it cannot be used.
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I am using Claude Code via Amazon Bedrock. However, starting with version 2.0.8, this bug has appeared and it is unusable.
403 {"Message":"User: arn:aws:sts::XXXX:assumed-role/XXXX/XXXX is not authorized to perform: bedrock:InvokeModel on resource:
arn:aws:bedrock:::foundation-model/anthropic.claude-sonnet-4-5-20250929-v1:0 with an explicit deny in a service control policy"}
The configuration file is written as follows.
$ cat ~/.claude/settings.json
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"env": {
"CLAUDE_CODE_USE_BEDROCK": "true",
"AWS_PROFILE": "XXXX",
"AWS_REGION": "us-west-2"
},
"feedbackSurveyState": {
"lastShownTime": 1754265830283
},
"alwaysThinkingEnabled": true
}
What Should Happen?
The value for region is not included in the values output to the log.
resource:
arn:aws:bedrock::${This is where the region should go}:foundation-model/anthropic.claude-sonnet-4-5-20250929-v1:0
It seems like AWS_REGION isn't being retrieved from the configuration file. Can you fix this?
The issue occurred in version 2.0.2, and while version 2.0.5 worked, the same problem persists in versions 2.0.8 and later.
Error Messages/Logs
Steps to Reproduce
- Use version 2.0.8 or later.
- Issuing the command results in an error.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.14
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗