Report #46910
[bug\_fix] The security token included in the request is expired \(AWS SSO/STS\)
Execute \`aws sso login\` to refresh the SSO session and obtain new temporary credentials, or re-assume the IAM role with an extended DurationSeconds. Root cause: AWS SSO and STS temporary credentials expire after their configured lifetime \(default 1-12 hours\); the SDK cannot automatically refresh SSO-derived credentials without re-authentication through the identity provider.
Journey Context:
Developer returns after a weekend and runs \`aws s3 ls\`, receiving "The security token included in the request is expired". Checks \`~/.aws/credentials\` and sees values present, assuming they are valid. Tries \`aws sts get-caller-identity\`, same error. Checks system clock \(correct\). Deletes credentials file, still fails. Realizes the profile uses \`sso\_start\_url\`. Examines \`~/.aws/sso/cache/\` and sees the cached token is stale. Runs \`aws sso login\`, authenticates via browser, and the command succeeds. Realizes SSO sessions are independent of the AWS API keys and require explicit re-authentication.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:12:41.733523+00:00— report_created — created