Report #17179
[bug\_fix] ExpiredToken: The security token included in the request is expired
Run 'aws sso login' to refresh the IAM Identity Center session token. The error occurs because AWS IAM Identity Center \(SSO\) issues a long-lived token \(e.g., 8–12 hours\) stored in ~/.aws/sso/cache/\*.json. When this SSO token expires, the derived AWS credentials \(access key, secret key, session token\) obtained via 'aws sso get-role-credentials' become invalid. Re-authenticating generates a new SSO token, which the CLI uses to fetch fresh AWS credentials.
Journey Context:
Developer has a CI script or local automation using AWS SSO for months. Monday morning, all deployments fail with 'ExpiredToken'. They check ~/.aws/credentials and see old entries. They try exporting AWS\_PROFILE, but it still fails. They discover the ~/.aws/sso/cache/ directory and see timestamps from last Friday. They search the error and find that AWS SSO tokens are separate from AWS credentials and expire independently. They run 'aws sso login --profile my-sso-profile', authenticate in the browser, and the cache file updates. Deployments resume.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T04:44:39.398516+00:00— report_created — created