Last active
February 1, 2020 17:10
-
-
Save rkpinheiro/44680a6c19c7735ec7c16d63e7e9af21 to your computer and use it in GitHub Desktop.
create aws profile script for CircleCI
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 | |
set -e | |
set -u | |
# Create credentials | |
mkdir ~/.aws | |
touch ~/.aws/config | |
chmod 600 ~/.aws/config | |
echo "[profile $1]" >> ~/.aws/config | |
echo "region = us-east-2" >> ~/.aws/config | |
echo "aws_access_key_id=$AWS_ACCESS_KEY_ID" >> ~/.aws/config | |
echo "aws_secret_access_key=$AWS_SECRET_ACCESS_KEY" >> ~/.aws/config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
create your profile running
bash aws-credentials.sh my-profile
and use it in--profile my-profile
argument on aws-cli