[AWS SSO] SSO credentials expired, but error message saids unable to resolve AWS account #20896
Labels
@aws-cdk/aws-sso
Related to the @aws-cdk/aws-sso package
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p2
Describe the bug
When trying to deploy stacks through
cdk deploy
, if your local aws sso crendentials has expired, cdk CLI will prompt the following message:which leads users to debug their CLI configurations (either through
cdk ... --profile xxx
or set env var such asAWS_PROFILE
andCDK_DEFAULT_PROFILE
.) But the real issue I had was that my AWS SSO session has expired, I just need to doaws sso login
again.I think this error message is misleading in this situation and needs to be improved.
Expected Behavior
When your AWS SSO session has expired, cdk CLI should prompt you with error message such as
The SSO session associated with profile $<some-profile> has expired or is otherwise invalid. To refresh this SSO session run aws sso login with the corresponding profile.
Current Behavior
CDK CLI cannot tell the difference between an expired AWS SSO credential and your AWS profile is unset with regard to CDK.
Reproduction Steps
Point CDK CLI to an expired AWS SSO profile, and have a local dummy stack definition. Then run
cdk deploy
.Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.28.1 (build d035432)
Framework Version
No response
Node.js Version
18.2.0
OS
MacOS 12.4
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: