Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add export-creds command to the CLI #7398
Add export-creds command to the CLI #7398
Changes from 6 commits
ace597d
37bcba3
949e466
fd8b383
280c39c
3ce9534
9c3afea
6056e51
b705644
59ebc9c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also probably clarify that the global arguments
--output
and--query
do not have an effect on the format to avoid confusion.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With regards to the error message, I'm wondering if we should include a note that the profile recursion cannot be deeper than X maximum? I'm mainly suggesting it as the error message is misleading if you do happen to have a non-cyclical credential process chain that is greater than or equal to four levels of recursion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah ended up having separate error messages for each case, now you get:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this case, I'm wondering if we should match with some of the more granular return codes that we defined for v2: https://awscli.amazonaws.com/v2/documentation/api/latest/topic/return-codes.html. Specifically, this seems like it should be a
253
for configuration error, which we can propagate by raising aConfigurationError
.For the other error cases, they seem like
253
configuration errors as well based on the documentation? I don't think I have a strong opinion on the ones that are returning1
, but I'm not sure if we should be using2
as a return code as it is only isolated to S3 right now.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ended up using 253 for both. If you have no credentials configured at all and try to run a CLI command you get
253
, so it made sense to be consistent that ifget_credentials()
returnsNone
, we have the same RC with this command.