Skip to content
Discussion options

You must be logged in to vote

Hey @coltenkrauter! Great question. When you run cdk bootstrap an ECR Repository is created which is used for all CDK related images. I think the default lifecycle policy conservatively keeps all images forever. However, you can edit this. See answer from Amazon Q Developer:

To modify the lifecycle policy of the ECR repository created by CDK bootstrap, you can use the App Staging Synthesizer feature. Here's how to do it: [1]

import * as cdk from 'aws-cdk-lib';

// Configure the App Staging Synthesizer
const app = new cdk.App({
  synthesizer: new cdk.DefaultStackSynthesizer({
    // Customize the image assets configuration
    imageAssetsTagPrefix: 'custom-prefix-',
    dockerTagPrefix: 'd…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bestickley
Comment options

Answer selected by coltenkrauter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants