-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cli): CLI hangs for 10 minutes on expired credentials (#21052)
When using environment variable credentials (`AWS_ACCESS_KEY_ID` etc) that were expired, the CLI would proceed to retry calls involving those credentials because the `ExpiredToken` error is marked as `retryable: true`. Because we have extremely aggressive retries for most of our SDK calls (since the CloudFormation throttling limits are low and we generate a lot of contention on them), calls can take up to 10 minutes to run out of retries. Try and detect `ExpiredToken` situations sooner and error out harder without trying to recover from them. This PR only handles the situation where there is a Roles to assume -- this works because calls to STS have a much lower retry count, and so it only takes a couple of seconds to run out of retries and surface the `ExpiredToken` to the CLI, which we can then use to abort early. This is all to work around aws/aws-sdk-js#3581 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
5 changed files
with
83 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters