From 5b79c513dc80a7276fc9372cc83c44bf7dc721fe Mon Sep 17 00:00:00 2001 From: Ben Limmer <630449+blimmer@users.noreply.github.com> Date: Tue, 23 Jan 2024 08:50:09 -0700 Subject: [PATCH] docs(ecr-assets): add link to AppStagingSynthesizer in ECR Assets documentation (#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* --- packages/aws-cdk-lib/aws-ecr-assets/README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-ecr-assets/README.md b/packages/aws-cdk-lib/aws-ecr-assets/README.md index 1bc1a2b468251..1cd855f0ea51f 100644 --- a/packages/aws-cdk-lib/aws-ecr-assets/README.md +++ b/packages/aws-cdk-lib/aws-ecr-assets/README.md @@ -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.