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

Deployment Failures due to Missing ECR Permissions are Unclear #474

Open
ashovlin opened this issue Mar 21, 2022 · 0 comments
Open

Deployment Failures due to Missing ECR Permissions are Unclear #474

ashovlin opened this issue Mar 21, 2022 · 0 comments
Labels
feature-request A feature should be added or improved. p2 This is a standard priority issue queued

Comments

@ashovlin
Copy link
Member

ashovlin commented Mar 21, 2022

Describe the bug
If a user is missing permissions for the ECR actions that are required to push an image, a deployment may fail without any indication that it is permissions related.

To Reproduce
Attempt to deploy an ASP.NET project to Amazon ECS using Fargate from a profile that does not have permissions outlined in https://docs.aws.amazon.com/AmazonECR/latest/userguide/repository-policy-examples.html

Logs
Missing ecr:PutImage:

...
85e4188ce0b6: Retrying in 2 seconds
f6f8b240d039: Retrying in 1 second
ef88254ae9f8: Retrying in 1 second
81d60a2eba3d: Retrying in 1 second
5f70bf18a086: Retrying in 1 second
85e4188ce0b6: Retrying in 1 second
EOF

Failed to push Docker Image

Added the write permissions for pushing, but missing BatchCheckLayerAvailability

...
4832fdfc801b: Waiting
bada36334461: Waiting
4e7bd47e4668: Waiting
error parsing HTTP 403 response body: unexpected end of JSON input: ""


Failed to push Docker Image

Expected behavior
It would be nice if we can check if we have appropriate permissions prior to deployment and show a helpful error if not, or at least throw a more helpful exception like we do elsewhere:

Unhandled exception.  This is a bug.  Please copy the stack trace below and file a bug at https://github.com/aws/aws-dotnet-deploy.
User: arn:aws:iam::<redacted> is not authorized to perform: cloudformation:DescribeStackEvents on resource:

Environment (please complete the following information):

  • CLI Version: [eg. 1.0.0] 0.36.8
  • Include the output of dotnet --info
Version:   6.0.201
  • OS Info: Windows 10

This is a 🐛 bug report

@ashishdhingra ashishdhingra added feature-request A feature should be added or improved. needs-review p2 This is a standard priority issue queued and removed needs-review labels Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p2 This is a standard priority issue queued
Projects
None yet
Development

No branches or pull requests

2 participants