CDK bootstrap: does not create ECR repository
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### 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_
Contributor guide
Research direction
Start with the CDK bootstrap command and the CDKToolkit CloudFormation stack, focusing on the AWS::ECR::Repository failure reported for CDK CLI 2.122.0. Reproduce the upgrade in eu-west-1 and verify that bootstrapping completes successfully while the container-assets ECR repository exists in the target registry.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100