[BUG] CC not taking the updated credentials with awsAuthRefresh
Environment
- Platform (select one):
- [ ] Anthropic API
- [X] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.53
- Operating System: macOS 15.5
- Terminal: iTerm2
Bug Description
I set up awsAuthRefresh with a script that uses okta 2FA to refresh my aws credentials in .aws/credentials.
This seems to be hit or miss. It often fails to actually use the refreshed credentials and I have to exit and resume with claude -r.
Added this to my settings.json:
"awsAuthRefresh": "gimme-aws-creds --profile MYPROFILE",
I do see the script being invoked by CC when credentials have expired, I receive the push notification and credentials are updated in .aws/credentials.
However it apparently fails to use the refreshed credentials.
See attached screenshot:
<img width="815" height="320" alt="Image" src="https://github.com/user-attachments/assets/0623ee62-c3a5-4ea1-88bf-cb20f5f17066" />
(Even if ideally I guess we'd like the refresh to be seamless for the user, in this case, given that there's a manual step anyway (the 2FA), it would be great if we could have an explicit command like /refresh-credential to tell CC to go and read again the refreshed IAM credentials from env / credentials file. So that one could also do that manually from another terminal, etc.)
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗