It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

ECR support broken?

We've had a pipeline using a private builder image in AWS ECR working for months, but a few hours ago is started failing:

[rpc error: code = Unknown desc = failed to resolve image "1234567890.dkr.ecr.ap-southeast-1.amazonaws.com/my-builder:latest": no available registry endpoint: unexpected status code https://1234567890.dkr.ecr.ap-southeast-1.amazonaws.com/v2/my-builder/manifests/latest: 405 Method Not Allowed, rpc error: code = Unknown desc = failed to resolve image "1234567890.dkr.ecr.ap-southeast-1.amazonaws.com/my-builder:latest": no available registry endpoint: unexpected status code https://1234567890.dkr.ecr.ap-southeast-1.amazonaws.com/v2/my-builder/manifests/latest: 403 Forbidden]

Checked if the credentials are still good from a local machine (they were), replaced them just in case, still failing.

2 answers

1 accepted

2 votes
Answer accepted

I've got an answer from Bitbucket support indicating this is an AWS-side issue specifically with puling ECR images in ap-southeast-1 and us-west-2. To work around it relocate the image somewhere else, e.g. us-east-1.

Has this been fixed? I need to use ap-southeast-1.

For future visitors, us-east-1 works, don't think us-west-2 works either.

Also this seems to catch people out because of inconsistent implementation in BitBucket Pipelines. If you do this, you will also get 403 Forbidden (or even 405) which can be really misleading.

image: <ecr repo>/<image>
aws:
access-key: <aws key>
secret-key: <aws pass>

You must do the below instead!

image:
name: <ecr repo>/<image>
aws:
access-key: <aws key>
secret-key: <aws pass>

Running into this same issue.

We are having issues with using custom-build image as a build image from ECR, getting authorisation issue when using:

image:
  name: <aws_account_id>.dkr.ecr.<region>.amazonaws.com/<image-name>
  aws: 
    access-key: $AWS_ACCESS_KEY
    secret-key: $AWS_SECRET_KEY

as  suggested at https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html?_ga=2.129658700.1587299411.1576522036-224181911.1567616164

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,041 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you