Skip to content

feat(pipelines): support removalPolicy and autoDeleteObjects for artifact bucket#37317

Open
syukawa-gh wants to merge 3 commits intoaws:mainfrom
syukawa-gh:feat/pipelines-artifact-bucket-removal-policy-clean
Open

feat(pipelines): support removalPolicy and autoDeleteObjects for artifact bucket#37317
syukawa-gh wants to merge 3 commits intoaws:mainfrom
syukawa-gh:feat/pipelines-artifact-bucket-removal-policy-clean

Conversation

@syukawa-gh
Copy link
Copy Markdown
Contributor

Add artifactBucketRemovalPolicy and artifactBucketAutoDeleteObjects properties to CodePipelineProps. When specified without an explicit artifactBucket, a bucket is created with the given lifecycle settings. This simplifies cleanup of dev/ephemeral pipeline stacks without requiring boilerplate bucket creation.

new CodePipeline(this, 'Pipeline', {
  synth: new ShellStep('Synth', { ... }),
  artifactBucketRemovalPolicy: RemovalPolicy.DESTROY,
  artifactBucketAutoDeleteObjects: true,
});

Closes #36624

…fact bucket

Add artifactBucketRemovalPolicy and artifactBucketAutoDeleteObjects
properties to CodePipelineProps. When specified without an explicit
artifactBucket, a bucket is created with the given lifecycle settings.
This simplifies cleanup of dev/ephemeral pipeline stacks.

Closes aws#36624
@github-actions github-actions bot added the effort/medium Medium work item – several days of effort label Mar 23, 2026
@aws-cdk-automation aws-cdk-automation requested a review from a team March 23, 2026 03:44
@github-actions github-actions bot added feature-request A feature should be added or improved. p2 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Mar 23, 2026
Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

@syukawa-gh
Copy link
Copy Markdown
Contributor Author

Exemption Request: Integration test snapshot cannot be generated locally because the new properties (artifactBucketRemovalPolicy, artifactBucketAutoDeleteObjects) are not yet in the released aws-cdk-lib. Unit test and README have been added.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Mar 23, 2026
@aws-cdk-automation aws-cdk-automation dismissed their stale review March 24, 2026 02:27

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(pipelines): Support 'removalPolicy' and 'autoDeleteObjects' in CodePipelineProps`

3 participants