(aws-ecr-assets): Custom ECR repository, custom name and/or tag
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
Using CDK 2.177.0, it is not possible to declare custom ECR for images built to be used by ECS. Not only that, it's also impossible to tag those images meaningfully.
**Allow user**:
- ... publishing to custom ECR without 3rd party library (as it was possible with CDK 1.0)
- and/or custom name of image and tagging
(if custom ECR is not possible, at least allow this as workaround)
This is follow up of #12597 and/or #25595 which have been closed without providing any working solution, and discussion #33157.
### Use Case
Every image created for any project using same AWS account/region ends up in very same ECR which makes image management impossible. Reasoning why current CDK behavior is not optimal is well described in _App Staging Synthesizer_ article (link below).
Tickets mentioned above failed to deliver any of this or replacement of CDK 1.0 behavior, because:
- [cdklabs/cdk-ecr-deployment](https://github.com/cdklabs/cdk-ecr-deployment) doesn't seem to work for all use cases/runtimes/frameworks (see comments of those tickets!)
- deploying custom lambda to juggle images feels bit complicated (another resource to watch) - pushing directly to dedicated repository seems to be more elegant
- 3rd party library without support
- [App Staging Synthesizer](https://aws.amazon.com/blogs/devops/enhancing-resource-isolation-in-aws-cdk-with-the-app-staging-synthesizer/) is not providing required flexibility
- being _alpha_ even after years and not part of core CDK library
- imo poorly documented, not many options available, no troubleshooting guide
(failed to make it work with existing CDK project - can't actually provide better feedback)
### Proposed Solution
_No response_
### Other Information
_No response_
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.177.0
### Environment details (OS name and version, etc.)
linux, node:20-alpine
Contributor guide
Research direction
No files, tests, or entry points are named. Start by reviewing the aws-ecr-assets implementation and the context in #12597, #25595, and discussion #33157. Define whether custom repositories, image names, tags, or all three are in scope, then verify that ECS image assets can be published and managed as requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100