Report #74206
[bug\_fix] Error loading SSO Token: Token for https://my-sso-portal.awsapps.com/start does not exist
Execute \`aws sso login --profile \` \(or \`aws sso login\` if using \`sso\_session\`\). This authenticates the user via OIDC against IAM Identity Center, obtaining a new access token \(valid 8–12 hours by default\) and caching it in \`~/.aws/sso/cache/\`. The AWS CLI then uses this token to retrieve temporary AWS credentials for the configured role.
Journey Context:
Developer returns from lunch and runs a Terraform plan using an SSO profile. The command fails immediately with "Error loading SSO Token." They inspect \`~/.aws/credentials\` and find it empty, which is expected for SSO. They check \`~/.aws/config\` and confirm the profile uses \`sso\_start\_url\`. They list \`~/.aws/sso/cache/\` and see a JSON file with an \`expiresAt\` field in the past. They recall that SSO sessions expire after the duration set by the admin \(often 8 hours\). They run \`aws sso login --profile prod\`, authenticate in the browser, and the Terraform plan succeeds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T07:09:13.955428+00:00— report_created — created