Report #47827
[bug\_fix] AWS EKS IRSA WebIdentity token expiration causing 'Unable to load credentials' after 1 hour
Upgrade AWS SDK to version 2.10.11 or later \(Java\) or equivalent in other languages that support automatic WebIdentity token refresh. The root cause is that older SDKs read the OIDC token file once at startup and cache the STS credentials without refreshing them when the 1-hour expiration approaches, despite the token file on disk \(at /var/run/secrets/eks.amazonaws.com/serviceaccount/token\) remaining valid.
Journey Context:
You deployed a Java microservice to EKS using IAM Roles for Service Accounts \(IRSA\). The pod starts up, successfully processes SQS messages for exactly 59 minutes, then suddenly begins throwing com.amazonaws.SdkClientException: 'Unable to load AWS credentials from any provider in the chain'. You exec into the pod and verify the IRSA token file exists and is readable. You check CloudTrail and see no AssumeRole calls failing. You realize the pod has been running for exactly 1 hour, matching the STS token duration. Checking your pom.xml, you see aws-sdk-java version 2.8.x. You search the AWS SDK release notes and discover that automatic credential refresh for WebIdentity tokens was added in version 2.10.11. Your version caches the initial credentials indefinitely. Upgrading to 2.10.11 causes the SDK to automatically re-read the token file and call AssumeRoleWithWebIdentity again before expiration, fixing the issue.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T10:45:47.678042+00:00— report_created — created