Created
September 9, 2019 17:10
-
-
Save sobi3ch/f9312995e084712c96e4e4b1109ca634 to your computer and use it in GitHub Desktop.
After downloading default user accessKeys.csv file from AWS console you can setup default profile with following bash function
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
aws.setup-credencials () | |
{ | |
FILE=$HOME/accessKeys.csv; | |
if test -f "$FILE"; then | |
echo "Reading from $FILE"; | |
aws configure set aws_access_key_id $(tail -n1 $HOME/accessKeys.csv | cut -d, -f1); | |
aws configure set aws_secret_access_key $(tail -n1 $HOME/accessKeys.csv | cut -d, -f2); | |
else | |
echo "Missing $FILE"; | |
fi | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment