Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot deploy from AWS ECR if repository name has forward slash #1625

Open
1 of 3 tasks
lenn4rd opened this issue Jan 28, 2022 · 0 comments
Open
1 of 3 tasks

Cannot deploy from AWS ECR if repository name has forward slash #1625

lenn4rd opened this issue Jan 28, 2022 · 0 comments

Comments

@lenn4rd
Copy link

lenn4rd commented Jan 28, 2022

Description

I deployed a web service using the template to pull from a Docker registry, AWS ECR in this case. I've granted full ECR access to the IAM user used by Porter but I get a 401 Unauthorized error when pulling the image (account ID and image name obfuscated):

Normal    Pulling    Pulling image "1234.dkr.ecr.eu-central-1.amazonaws.com/lenn4rd/image:latest"
Warning    Failed    Failed to pull image "1234.dkr.ecr.eu-central-1.amazonaws.com/lenn4rd/image:latest": rpc error: code = Unknown desc = failed to pull and unpack image "1234.dkr.ecr.eu-central-1.amazonaws.com/lenn4rd/image:latest": failed to resolve reference "1234.dkr.ecr.eu-central-1.amazonaws.com/lenn4rd/image:latest": pulling from host 1234.dkr.ecr.eu-central-1.amazonaws.com failed with status code [manifests latest]: 401 Unauthorized
Warning    Failed    Error: ErrImagePull
Normal    BackOff    Back-off pulling image "1234.dkr.ecr.eu-central-1.amazonaws.com/lenn4rd/image:latest"
Warning    Failed    Error: ImagePullBackOff

Note the ECR repository has a forward slash in its name which is an allowed character in AWS but seems to break the image pull in Porter, as discovered after I posted to the Discord #help channel.

I can docker push and docker pull using the same Porter credentials to login to ECR.

Location

  • Browser
  • CLI
  • API

Steps to reproduce

  1. Create an AWS ECR repository with a forward slash in its name
  2. Create and deploy a web service in Porter using an image from this registry
  3. Deployment fails with Error: ErrImagePull and Error: ImagePullBackOff and doesn't recover

Additional Details

IAM credentials and policies are valid and permissive enough so the Unauthorized error message is misleading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant