Created
June 12, 2018 16:24
-
-
Save asselstine/631eebb5bc2a8b59328e506a1f51f57a to your computer and use it in GitHub Desktop.
Bash function to easily export your AWS credentials
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
export_aws_profile() { | |
profile=$1 | |
profile=${profile:-default} | |
echo "Exporting AWS profile $profile..." | |
export AWS_ACCESS_KEY_ID=`aws configure get aws_access_key_id --profile ${profile}` | |
export AWS_SECRET_ACCESS_KEY=`aws configure get aws_secret_access_key --profile ${profile}` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment