[BUG] warn for ec2 iam role issue
Resolved 💬 2 comments Opened Jan 30, 2026 by yingtaojuzi Closed Feb 28, 2026
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?
500 error in prediction: failed to refresh cached credentials, no EC2 IMDS role found, operation
error ec2imds
this bug showed up since v2.1.23
What Should Happen?
500 error in prediction: failed to refresh cached credentials, no EC2 IMDS role found, operation
error ec2imds
each time when I ask claude code to give me any answers, 100% re-produce
Error Messages/Logs
500 error in prediction: failed to refresh cached credentials, no EC2 IMDS role found, operation
error ec2imds
Steps to Reproduce
any prompt will hit this error
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.25
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
iTerm2
Additional Information
I hit this error on mac and Linux system
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗