Skip to content

Instantly share code, notes, and snippets.

@patrickpierson
Created November 8, 2016 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patrickpierson/95feb5fa78d92b532bb6ea6b533ff8ea to your computer and use it in GitHub Desktop.
Save patrickpierson/95feb5fa78d92b532bb6ea6b533ff8ea to your computer and use it in GitHub Desktop.
setup .bashrc to allow you to easily change the default aws profile
# 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