Created
November 8, 2016 15:43
-
-
Save patrickpierson/95feb5fa78d92b532bb6ea6b533ff8ea to your computer and use it in GitHub Desktop.
setup .bashrc to allow you to easily change the default aws profile
This file contains hidden or 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
# Add this to .bashrc | |
function default-aws() { | |
export AWS_PROFILE=$1 | |
} | |
# close terminal and reopen. Run the command default-aws <profile> and it will change the default profile used. | |
# This can replace the need to run --profile at the end of a aws cli command. Useful when using something like | |
# https://github.com/DualSpark/cloudformation-environmentbase which doesnt handle multiple profiles very well |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment