Created
March 13, 2019 06:45
-
-
Save ctgardner/a0fcba5ff4678095650a500054fbfa9d to your computer and use it in GitHub Desktop.
Export the credentials an AWS CLI profile
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
#!/bin/bash | |
# usage: $ `./export_aws_profile.sh my-profile` | |
profile=$1 | |
echo "export AWS_ACCESS_KEY_ID=$(aws configure get $profile.aws_access_key_id)" | |
echo "export AWS_SECRET_ACCESS_KEY=$(aws configure get $profile.aws_secret_access_key)" | |
echo "export AWS_DEFAULT_REGION=$(aws configure get $profile.region)" | |
unset profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment