claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] `awsAuthRefresh` triggers even when AWS credentials are still valid (not expired)

Open notzheng opened this issue 1 month ago • 3 comments

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

notzheng avatar Jan 16 '26 05:01 notzheng

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/12421
  2. 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

github-actions[bot] avatar Jan 16 '26 05:01 github-actions[bot]

same here.

Luren-w avatar Jan 16 '26 05:01 Luren-w

same here.

jmytea avatar Jan 16 '26 06:01 jmytea

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

MarioPires avatar Jan 19 '26 10:01 MarioPires