Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to push an image to public ECR repository

I have tried using "atlassian/aws-ecr-push-image:1.4.2" to push an image to an existing repository in my AWS account. But unfortunately the pipe is only being able push to private repositories.


When i create a repository in public registry and try the same getting this following error


"The repository with name 'xxxxxxxx' does not exist in the registry with id 'xxxxxxxxx'"

3 answers

@siddharthjoshi@Kushan Harshana Gunasekera hi. We released new version of pipe:

  - pipe: atlassian/aws-ecr-push-image:1.5.0
      IMAGE_NAME: my-docker-image
      ECR_PUBLIC: "true"
      PUBLIC_REGISTRY_ALIAS: registry-alias

with support of pushing images to ECR Public Registry.

Please, provide us feedback.

Regards, Igor.

I would love to try this out @Igor Stoyanov , Will update one of my repositories and come back to you !!!



Siddharth Joshi K

Glad to hear that @Igor Stoyanov , I'll try it out. You have been a great help, Thank you @Igor Stoyanov .

Here I've mentioned the reasons why this is happen in the Stack Overflow. Please have a look. 

I think the "atlassian/aws-ecr-push-image:1.4.2" image doesn't support Amazon ECR Public repositories. I had the same issue, what I did was manually installed the AWS CLI version 2 in the pipeline and ran all the push commands.

That's it, but you must provide the region as us-east-1. Otherwise you'll get the same error again and again.

Yes, funnily i actually did the same :D

And even i faced this weird region (us-east-1) restrictions. But as you mentioned "atlassian/aws-ecr-push-image:1.4.2" does not seem to support public repo, as by default it's looking for a repo in the mentioned name in the private ECR and there were no parameters we could use to make it look in the public repo.

0 votes

Hi @siddharthjoshi

Thank you for your question!

Have you provided all parameters required parameters for pipe?
Do you have permissions to push images to that repository?
It would be nice if you provide us with more details to help you: pipeline configuration, logs, etc.


Oleksandr Kyrdan

Hello @Oleksandr Kyrdan 

I'm having the same issue, the thing is Amazon ECR now supports public repositories. The aws ecr command is using for the private repositories and aws ecr-public command is using for the public repositories and public repositories are only work with us-east-1 region. I've addressed this issue in the Stack Overflow, please have a look for more details. 

Like Igor Stoyanov likes this

@Oleksandr Kyrdan What @Kushan Harshana Gunasekera mentions is correct, to push to the public repo we need to use "aws ecr-public". I have permission to push to the repo, i have already pushed few images to my private repo and also i was able to push to public repo by writing the commands manually. The code below show how i managed to push the code to public ECR


  - step:
name: "Build server image"
  - docker
- apt-get update
- docker build -t <image-name> .
- apt-get install -y python3-pip
- pip3 install -U awscli
- aws configure set aws_access_key_id <access-key-id>
- aws configure set aws_secret_access_key <secret-key>
- aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin
- docker tag <image-name><repo-name>/<image-name>
- docker push<repo-name>/<image-name>


Suggest an answer

Log in or Sign up to answer

Atlassian Community Events