Open argenstijn opened 10 months ago
Deleting the cloudformation stack and then perform CDK bootstrap worked!. Seems to be a bug!
Thank you for the report.
Deleting the cloudformation stack and then perform CDK bootstrap worked!. Seems to be a bug!
Which cloudformation stack did you delete?
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
Please let the issue open, as I still encounter the problem; despite deleting the stack and bostrapping as previously advised.
I can confirm that the issue exists still. ECR Repository Resource is actually defined in default bootstrapping cloudformation template, but the ECR Repository resource is not created. I had to create manually private repository 'cdk-{Qualifier}-container-assets-{AccountId}-{Region}' then it worked out. It was from my side actually Account Guardrail Setting that ECR Repository without KMS Encryption is not allowed to be created.
I can confirm that the issue exists still. ECR Repository Resource is actually defined in default bootstrapping cloudformation template, but the ECR Repository resource is not created. I had to create manually private repository 'cdk-{Qualifier}-container-assets-{AccountId}-{Region}' then it worked out. It was from my side actually Account Guardrail Setting that ECR Repository without KMS Encryption is not allowed to be created.
seeing the same bug
After deleting the Cloudformation stack, you might get a different error with the S3 bucket. Make sure you also delete the bucket before bootstrapping again.
CDKToolkit: creating CloudFormation changeset...
6:06:00 PM | CREATE_FAILED | AWS::S3::Bucket | StagingBucket
After deleting the Cloudformation stack and the bucket, right the cdk bootstrap
command again. It worked for me.
❯ cdk --version
2.156.0 (build 2966832)
first, you need to delete the the cloudFormation then try cdk bootstrap
Describe the bug
When i start CDK bootstrap
the repository with name 'cdk-hnb659fds-container-assets-XXXXXXXXXXX-eu-west-1' does not exist in the registry with id 'XXXXXXXX'
Why does CDK not create this resource by itself? And it's really needed. We don't use this registry?
We are using CDK version 2.122.0
Expected Behavior
CDK bootstrap upgraded the current one without any failures
Current Behavior
CDKToolkit | 13:18:14 | UPDATE_FAILED | AWS::ECR::Repository | ContainerAssetsRepository Resource handler returned message: "The repository with name 'cdk-hnb659fds-container-assets-XXXXXXXXXXX-eu-west-1' does not exist in the registry with id 'XXXXXXXXXX' (Service: Ecr, Status Code: 400, Request ID: dd8e5c15-471f-40e6-b66c-99089de92d7e)" (RequestToken: 5b5e2a1e-5f68-9ebb-ad24-c691481aa027, HandlerErrorCode: NotFound) ❌ Environment aws://XXXXXXXXXX/eu-west-1 failed bootstrapping: Error: The stack named CDKToolkit failed to deploy: UPDATE_ROLLBACK_COMPLETE: Resource handler returned message: "The repository with name 'cdk-hnb659fds-container-assets-XXXXXXX-eu-west-1' does not exist in the registry with id 'XXXXXXXXXXXXX' (Service: Ecr, Status Code: 400, Request ID: dd8e5c15-471f-40e6-b66c-99089de92d7e)" (RequestToken: 5b5e2a1e-5f68-9ebb-ad24-c691481aa027, HandlerErrorCode: NotFound) at FullCloudFormationDeployment.monitorDeployment (c:\ontwikkel\tools\npm\prefix\node_modules\aws-cdk\lib\index.js:421:10615) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async c:\ontwikkel\tools\npm\prefix\node_modules\aws-cdk\lib\index.js:426:2104 at async Promise.all (index 0) at async CdkToolkit.bootstrap (c:\ontwikkel\tools\npm\prefix\node_modules\aws-cdk\lib\index.js:426:1949) at async exec4 (c:\ontwikkel\tools\npm\prefix\node_modules\aws-cdk\lib\index.js:479:53420)
The stack named CDKToolkit failed to deploy: UPDATE_ROLLBACK_COMPLETE: Resource handler returned message: "The repository with name 'cdk-hnb659fds-container-assets-XXXXXXXX-eu-west-1' does not exist in the registry with id 'XXXXXXXXX' (Service: Ecr, Status Code: 400, Request ID: dd8e5c15-471f-40e6-b66c-99089de92d7e)" (RequestToken: 5b5e2a1e-5f68-9ebb-ad24-c691481aa027, HandlerErrorCode: NotFound)
Reproduction Steps
CDK bootstrap
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.122.0 (build 7e77e02)
Framework Version
2.122.0
Node.js Version
v20.11.0
OS
Windows 10
Language
Java
Language Version
Java 21
Other information
No response