Report #78933
[bug\_fix] The security token included in the request is expired
Execute aws sso login to refresh the SSO session token, which generates new temporary role credentials. Root cause: AWS SSO issues a long-lived session token \(8-12 hours\) cached in ~/.aws/sso/cache. When it expires, the derived IAM role credentials \(in ~/.aws/cli/cache\) also become invalid, even if the role's temporary credentials haven't reached their 1-hour AWS STS limit.
Journey Context:
Developer runs a deployment script in the morning after authenticating with aws sso login. The script works. The next morning, they run it again without re-authenticating and receive expired token errors. They check ~/.aws/credentials and see entries, but don't realize these are session credentials tied to the SSO token. They try exporting explicit AWS\_ACCESS\_KEY\_ID from the file, but the error persists because the session token is missing \(or the underlying SSO token is expired\). They check aws sts get-caller-identity and it fails. They run aws sso list-accounts and see 'token has expired'. After re-running aws sso login, the script works, confirming that the SSO token refresh cascades to valid STS credentials.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T15:05:04.692692+00:00— report_created — created