Report #6126
[bug\_fix] ExpiredToken: The security token included in the request is expired
Run \`aws sso login --profile \` to refresh the SSO session token. If the session duration is too short, extend the session duration in the IAM Identity Center settings for that permission set.
Journey Context:
A developer runs a long-running data pipeline using Boto3 configured with an SSO profile. After exactly one hour, the script crashes with 'ExpiredToken'. They check \`~/.aws/sso/cache/\` and see the \`accessToken\` has expired. They attempt \`aws sso login\` without the \`--profile\` flag, but the error persists because the cache is profile-specific. They realize they must run \`aws sso login --profile prod-sso\` to trigger the browser auth and obtain a new accessToken for that specific profile. After logging in, the script resumes because the SDK now finds the valid cached token associated with the profile.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T23:13:12.780825+00:00— report_created — created