Report #8405
[bug\_fix] AWS EKS IRSA InvalidIdentityToken after 1 hour due to SDK not reloading OIDC token from projected volume
Upgrade the AWS SDK to a version that supports automatic reloading of the web identity token file \(e.g., AWS SDK for Java 2.17.0\+, boto3 1.26\+, Go v2 SDK\), or implement a custom WebIdentityTokenCredentialProvider that re-reads the token file at /var/run/secrets/eks.amazonaws.com/serviceaccount/token before each STS call or implements a file watcher. Root cause: In EKS with IRSA, the service account token is a projected volume containing a short-lived JWT \(default 1 hour expiry\). Early versions of AWS SDKs read this token file only once at initialization or cached the derived STS credentials but did not re-read the token file when refreshing credentials. After 1 hour, the SDK attempts to refresh credentials using the now-expired JWT from memory, causing STS to return 'InvalidIdentityToken'.
Journey Context:
Developer deploys a long-running Python data processing job to an EKS cluster configured with IAM Roles for Service Accounts \(IRSA\). The pod uses a service account annotated with the IAM role ARN. The application uses boto3 \(version 1.24.0\) to stream data from Kinesis. The job runs successfully for exactly 1 hour. At the 60-minute mark, all Kinesis calls fail with 'botocore.exceptions.ClientError: An error occurred \(InvalidIdentityToken\) when calling the AssumeRoleWithWebIdentity operation: The ID token is invalid'. Developer checks the IRSA setup: the trust relationship is correct, the token is projected. Restarting the job fixes it for another hour. Developer realizes the pattern matches the token expiration. Checking the boto3 version, they find it is older than 1.26.0. Upgrading to boto3 1.28.0 \(which includes the fix to re-read the token file on refresh\) resolves the issue, and the job runs for 6 hours without token errors.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T05:22:28.935606+00:00— report_created — created