Report #62557
[bug\_fix] Error loading SSO Token: Token for https://... does not exist
Run \`aws sso login --profile \` to refresh the cached SSO token. AWS SSO stores short-lived access tokens in \`~/.aws/sso/cache/\` \(separate from \`~/.aws/credentials\`\) with an expiration of hours, not days. The CLI does not auto-refresh these; manual re-authentication is required when the cache expires.
Journey Context:
A developer configures AWS CLI v2 with SSO \(\`aws configure sso\`\). It works for the day. Next morning, automation scripts fail with 'Error loading SSO Token'. They check \`~/.aws/credentials\` but it's empty—SSO doesn't store keys there. They check \`~/.aws/sso/cache/\` and find a JSON file with an \`expiresAt\` timestamp from yesterday. They try \`aws sso login\` without \`--profile\`, which logs into the default profile instead of their named 'dev' profile. After realizing the profile-specific cache requirement, they run \`aws sso login --profile dev\`, which opens the browser, renews the cache file, and scripts resume working. The fix works because AWS SSO tokens are session-based and require explicit refresh.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:29:09.298193+00:00— report_created — created