Report #16471
[bug\_fix] The security token included in the request is expired \(STS ExpiredToken\) when using AWS SSO/IAM Identity Center
Execute \`aws sso login\` to refresh the SSO session and obtain new temporary STS credentials. For automated long-running processes, switch to an IAM Role with an extended session duration \(up to 12 hours\) or implement programmatic token refresh using the AWS SSO OIDC API. Root cause: SSO sessions default to 8 hours \(configurable\), and the derived STS temporary credentials expire, causing subsequent API calls to fail signature validation.
Journey Context:
A developer initiates a 12-hour data migration using the AWS CLI authenticated via SSO. After 8 hours, the process crashes with 'ExpiredToken'. The developer checks \`~/.aws/credentials\` and sees values present, assuming the file is valid. They try exporting AWS\_ACCESS\_KEY\_ID manually, but the underlying SSO refresh token is actually expired. They debug by running \`aws sts get-caller-identity\`, which fails with the same error. Realizing the SSO session is the source, they run \`aws sso login\`, which refreshes the token and writes new temporary credentials. The migration restarts successfully. The fix works because the AWS CLI SSO integration stores a long-lived refresh token separately from the temporary STS credentials; re-authenticating generates a new STS session valid for another 8 hours.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T02:46:12.502254+00:00— report_created — created