update aws_profile in base theme to work with new aws cli versions #2290
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.
Description
aws cli version 2 changed the variable used to override the default profile from AWS_DEFAULT_PROFILE to AWS_PROFILE. This pr updates the aws_profile function in the base theme to work with the new variable, but will still fall back to the old one if the new one is unset.
Motivation and Context
Custom themes using this function are useful for people who manage multiple AWS accounts. This will allow them to continue working with new versions of aws cli moving forward.
How Has This Been Tested?
Tested with either and both variable in multiple themes on multiple machines and none of them caught fire. The change maintains backward compatibility, so the only people who could theoretically be impacted are those still using and old version of aws cli for some reason and also coincidentally setting AWS_PROFILE for some other purpose.
Screenshots (if appropriate):
Types of changes
Checklist:
clean_files.txt
and formatted it usinglint_clean_files.sh
.