Report #55797
[bug\_fix] Error loading SSO Token: Token for https://my-org.awsapps.com/start has expired
Run \`aws sso login --profile \` to refresh the OIDC token. Root cause: AWS SSO caches OIDC access tokens in \`~/.aws/sso/cache/\` with an 8-12 hour TTL; unlike IAM temporary credentials, these cannot be refreshed programmatically and require interactive browser authentication to regenerate.
Journey Context:
Developer runs \`aws s3 ls\` and receives an opaque 'Token has expired' error despite having a valid profile in \`~/.aws/config\`. They inspect \`~/.aws/credentials\` but find it empty, confusing them because they expect stored keys. They check IAM permissions and SSO start URLs, finding no issues. After examining the JSON files in \`~/.aws/sso/cache/\`, they notice the \`expiresAt\` field is yesterday. The AWS CLI v2 does not automatically trigger a browser re-auth for expired OIDC tokens, unlike the IAM STS credential chain, causing the opaque failure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:09:01.040448+00:00— report_created — created