Skip to content

Instantly share code, notes, and snippets.

@asselstine
Created June 12, 2018 16:24
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 asselstine/631eebb5bc2a8b59328e506a1f51f57a to your computer and use it in GitHub Desktop.
Save asselstine/631eebb5bc2a8b59328e506a1f51f57a to your computer and use it in GitHub Desktop.
Bash function to easily export your AWS credentials
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