-
Notifications
You must be signed in to change notification settings - Fork 4k
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
(aws-ecr-assets): DockerImageAsset fails to upload to ECR as the repo is not created #12076
Comments
Hi, I’m also seeing a similar issue while trying to create a lambda function using the new DockerImageFunction:
The image also created successfully at build, but failed to upload to an ECR repo with the following error. I ran it again after bootstrapping the account and it did not fix the issue.
|
+1 I'm also experiencing this issue and would appreciate a native fix within CDK instead of the given workaround. |
I am seeing this in both DockerImageFunction and DockerImageAsset. Are there any workarounds? I need to publish an image in my stack. |
@cdimascio did you bootstrap your environment using |
Reproduced this using CDK v2. We have never used any CDK v1 in this account. |
Anything happening with this? I'm still getting the massage after bootstrapping multiple times :(
Should i supply |
Our team is also having this issue. And if I understand correctly there no way to specify to which repo a built image is published when using |
I had the same issue, my workaround was deleting CDKToolkit from CloudFormation and it's S3 bucket and then bootstraping again. |
This should not be an issue currently as long as you have bootstrapped your account. We have other issues tracking adding support for pushing ECR images to a user non-bootstrap ECR repository (see #12597). I'll leave this open for a little bit to allow for responses in case this is still an issue for anyone. |
+1 on @vzolin. I faced this issue, but while debbuging a problem, I manually deleted the ECR repo created on I only find in the docs how to customize the bootstrap not force a override or even a full deletion of the stack and all resources since, for this work, I also had to empty and delete the S3 bucket created by |
@ibrahimcesar before deleting the There is an option to run bootstrap with |
@corymhall I only tried |
|
I've come across this issue after starting a second CDK project. We bootstrapped in the first project, but that project didn't require a default ECR, so It wasn't created. Now trying to build this one with a Tried bootstrapping and force bootstrapping, neither have succeeded in creating the default ECR.. Nuking the original CDKToolkit CF Stack and s3 bucket and re-bootstrapping resolved the issue. |
+1 |
When creating a
DockerImageAsset
like below...The image is created successfully at build time, however it fails to upload to an ECR repository. When the task enters a "stopped" status, the following error is reported.
It fails because the repo it's trying to publish to does not exist. It was never created.
What did you expect to happen?
The ECR repository referenced in the error message e.g
XXXX.dkr.ecr.us-west-2.amazonaws.com/cdk-<xxxx>-container-assets-<account>-<region>
would have been be created by CDK and subsequently the image would successfully upload to that ECR repo.What actually happened?
The upload fails since the ECR repo was not created.
Also, during stack creation the Task status continuously iterates from pending, provisioning, to stopped. Each time it reaches status, stopped, it reports the the error above, then tries again. Ulitmately, the task goes intoa loop and cannot successfully start (i waited ~40+ minutes. it's possible that it would eventually give up).
Workaround
cdk-<xxxx>-container-assets-<account>-<region>
as specified in the error message.For my use case, I refrenced the
DockerImageAsset
above in thetaskImageOptions
onApplicationLoadBalancedFargateService
, like so...Environment
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: