Skip to content

Instantly share code, notes, and snippets.

@SlootSantos
Last active June 29, 2020 16:47
Show Gist options
  • Save SlootSantos/386a0fe7dd1022c21e95c8d8b1f066ab to your computer and use it in GitHub Desktop.
Save SlootSantos/386a0fe7dd1022c21e95c8d8b1f066ab to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# This fetches the AWS CLI
# inflates it
# and sets location to the path
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
# set the credentials to the default AWS CLI configuration file
mkdir ~/.aws # just in case the CLI did not create the file yet
AWS_CRED_FILE=~/.aws/credentials # just in case the CLI did not create the file yet
# make sure to pass the access and secret keys via the CI tool!
echo "[default]" > $AWS_CRED_FILE
echo -e "aws_access_key_id=$ACCESS_KEY" >> $AWS_CRED_FILE
echo -e "aws_secret_access_key=$SECRET_KEY" >> $AWS_CRED_FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment