[BUG] `awsAuthRefresh` triggers even when AWS credentials are still valid (not expired)
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 configured awsAuthRefresh in Claude Code’s settings.json, but the command is triggered every time I run Claude, regardless of whether the AWS credentials have expired.
{
"awsAuthRefresh": "aws sso login --profile <MY_PROFILE_NAME>"
}
What Should Happen?
wsAuthRefresh should only run when the AWS credentials are expired.
Error Messages/Logs
none
Steps to Reproduce
set this in ~/.claude/settings.json
{
"awsAuthRefresh": "aws sso login --profile <MY_PROFILE_NAME>"
}
run claude
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
No response
Claude Code Version
2.1.9
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
No response
Found 2 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/12421
- https://github.com/anthropics/claude-code/issues/9027
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
same here.
same here.
I was hitting this problem until I noticed the role name was not the same as the one I had access to in AWS.
so, double check the values - account number, role name, and IAM configs.
edit: actually, nevermind.. it came back when I prompted something..
edit2: changed to Administrator role and it's working now, then I realized the account did not have the necessary IAM configuration set!
https://code.claude.com/docs/en/amazon-bedrock?search=autoUpdatesChannel#iam-configuration