Skip to content

(aws-ecr-assets): Custom ECR repository, custom name and/or tag #33228

@wdolek

Description

@wdolek

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 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 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-ecr-assetsRelated to AWS CDK Docker Image Assetseffort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions