What I have tried:
- I can successfully push to Amazon ECR (details in this answer I posted)
- I am failing to pull the above image in a subsequent pipeline (see example).
Example bitbucket-pipeline.yml
image:
name: <ecr-registry-address>/<repository>:<tag>
aws:
access-key: ${AWS_ACCESS_KEY_ID}
secret-key: ${AWS_SECRET_ACCESS_KEY}
pipelines:
default:
- step:
script:
- echo 'Hello World'
The error I get back:
Finally:
In order to push to the repository, I already setup IAM roles for the bitbucket-pipelines account (AmazonEC2ContainerRegistryPowerUser). Is there any other setup required?
I found that the cause for the above error was the ${} format. Removing the curly brackets allowed everything to work as expected.
More details here.