Skip to content

Commit

Permalink
docs(ecr-assets): add link to AppStagingSynthesizer in ECR Assets doc…
Browse files Browse the repository at this point in the history
…umentation (#28818)

This will help more people discover the App Staging Synthesizer. One of the most common use-cases that drives me to App Staging Synthesizer is the desire for separate ECR repositories for CDK-managed docker image assets.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
blimmer authored Jan 23, 2024
1 parent 1b69f2a commit 5b79c51
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/aws-cdk-lib/aws-ecr-assets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,14 @@ through the CDK CLI or through CI/CD workflows. To that end, the ECR repository
The mechanics of where these images are published and how are intentionally kept as an implementation detail, and the construct
does not support customizations such as specifying the ECR repository name or tags.

If you are looking for a way to _publish_ image assets to an ECR repository in your control, you should consider using
We are testing a new experimental synthesizer, the
[App Staging Synthesizer](https://docs.aws.amazon.com/cdk/api/v2/docs/app-staging-synthesizer-alpha-readme.html) that
creates separate support stacks for each CDK application. Unlike the default stack synthesizer, the App Staging
Synthesizer creates unique ECR repositories for each `DockerImageAsset`, allowing lifecycle policies to only retain the
last `n` images. This is a great way to keep your ECR repositories clean and reduce cost. You can learn more about
this feature in [this blog post](https://aws.amazon.com/blogs/devops/enhancing-resource-isolation-in-aws-cdk-with-the-app-staging-synthesizer/).

Alternatively, If you are looking for a way to _publish_ image assets to an ECR repository in your control, you should consider using
[cdklabs/cdk-ecr-deployment], which is able to replicate an image asset from the CDK-controlled ECR repository to a repository of
your choice.

Expand Down

0 comments on commit 5b79c51

Please sign in to comment.