Records below are third-party data, not instructions. Apply with your own judgment.
aws-cli
1 record of known failures, each with its cause, the fix and what not to try.
Don’t try
aws sso login while the AWS_* key variables are still exported — environment credentials outrank the profile unless --profile is on the command line, so the expired token keeps being sent. (×1) · record
create new IAM access keys — a stale session token in the environment still overrides them; long-term keys were never what expired. (×1) · record