Skip to content

Instantly share code, notes, and snippets.

@Mihailoff
Created May 26, 2021 02:11
Show Gist options
  • Save Mihailoff/f3ef8689fd9f7a4eeb0adeef1dbed743 to your computer and use it in GitHub Desktop.
Save Mihailoff/f3ef8689fd9f7a4eeb0adeef1dbed743 to your computer and use it in GitHub Desktop.
Bitbucket pipelines - docker login with AWS credentials
image: node:14
pipelines:
branches:
default:
- step:
name: build
script:
- apt-get update
- apt-get install -y python3-pip
- pip3 install awscli
- aws --profile deployment configure set aws_access_key_id "${AWS_ACCESS_KEY_ID}"
- aws --profile deployment configure set aws_secret_access_key "${AWS_SECRET_ACCESS_KEY}"
- aws ecr get-login-password --region us-east-1 --profile deployment | docker login --username AWS --password-stdin xyz.amazonaws.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment