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.
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.
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
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>
It looks like you're new here. Sign in or register to get started.