From b800da8172919a1ab27f885549e701d98323c9bb Mon Sep 17 00:00:00 2001 From: Sumu Pitchayan <35242245+sumupitchayan@users.noreply.github.com> Date: Thu, 31 Oct 2024 10:45:25 -0400 Subject: [PATCH] feat(bootstrap): add lifecycle rule to abort multipart uploads after 7 days (#31956) Closes #29045 ### Reason for this change AWS Trusted Advisor rolled out the S3 Incomplete Multipart Upload Abort Configuration check to help users manage costs associated with Amazon S3 storage ### Description of changes Added a new lifecycle rule to the bucket and incremented the bootstrap version to 24. ### Description of how you validated changes N/a ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *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/api/bootstrap/bootstrap-template.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml index 164f72d626c53..15acb72c4927d 100644 --- a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml +++ b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml @@ -212,6 +212,10 @@ Resources: Status: Enabled NoncurrentVersionExpiration: NoncurrentDays: 30 + - Id: AbortIncompleteMultipartUploads + Status: Enabled + AbortIncompleteMultipartUpload: + DaysAfterInitiation: 1 UpdateReplacePolicy: Retain DeletionPolicy: Retain StagingBucketPolicy: @@ -653,7 +657,7 @@ Resources: Type: String Name: Fn::Sub: '/cdk-bootstrap/${Qualifier}/version' - Value: '24' + Value: '25' Outputs: BucketName: Description: The name of the S3 bucket owned by the CDK toolkit stack