Last active
May 3, 2020 14:07
-
-
Save mijndert/d3058f3e9e02836078133b5e5a7259c4 to your computer and use it in GitHub Desktop.
simple script to read credentials from ~/.aws/credentials and export it into your env vars
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
| #!/usr/bin/env bash | |
| echo "Enter the account for which you want to export credentials and [enter]" | |
| read account | |
| export AWS_ACCESS_KEY_ID=$(aws configure get $account.aws_access_key_id) | |
| export AWS_SECRET_ACCESS_KEY=$(aws configure get $account.aws_secret_access_key) | |
| export AWS_REGION=$(aws configure get $account.region) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment