Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save goindwalia/4843ac83a87920f0fe167cc29c417b48 to your computer and use it in GitHub Desktop.
Save goindwalia/4843ac83a87920f0fe167cc29c417b48 to your computer and use it in GitHub Desktop.
#!/bin/bash
pip install --upgrade --user awscli
mkdir -p ~/.aws && chmod 755 ~/.aws
cat << EOF > ~/.aws/credentials
[default]
aws_access_key_id = XXXXXX
aws_secret_access_key = XXXXXX
EOF
cat << EOF > ~/.aws/config
[default]
output = json
region = XXXXX
EOF
chmod 600 ~/.aws/credentials
ecr-login=$(aws ecr get-login --region XXXXX)
$ecr-login
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment