From 8e2d92d3b1ec6498e2bf404a74c57ca1ba18a53c Mon Sep 17 00:00:00 2001 From: Kaizen Conroy Date: Fri, 25 Oct 2024 19:22:43 -0400 Subject: [PATCH] merge issues --- .../lib/api/garbage-collection/garbage-collector.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/aws-cdk/lib/api/garbage-collection/garbage-collector.ts b/packages/aws-cdk/lib/api/garbage-collection/garbage-collector.ts index 2ad177d825c05..67f7f98cd4ec0 100644 --- a/packages/aws-cdk/lib/api/garbage-collection/garbage-collector.ts +++ b/packages/aws-cdk/lib/api/garbage-collection/garbage-collector.ts @@ -211,9 +211,6 @@ export class GarbageCollector { if (crypto.getFips() === 1) { throw new Error('Garbage Collection is currently not supported in FIPS environments'); } - const s3 = sdk.s3({ - needsMd5Checksums: true, - }); const qualifier = await this.bootstrapQualifier(sdk, this.bootstrapStackName); const activeAssets = new ActiveAssetCache(); @@ -320,7 +317,9 @@ export class GarbageCollector { * Perform garbage collection on S3 assets */ public async garbageCollectS3(sdk: ISDK, activeAssets: ActiveAssetCache, backgroundStackRefresh: BackgroundStackRefresh) { - const s3 = sdk.s3(); + const s3 = sdk.s3({ + needsMd5Checksums: true, + }); const bucket = await this.bootstrapBucketName(sdk, this.bootstrapStackName); const numObjects = await this.numObjectsInBucket(s3, bucket); const printer = new ProgressPrinter(numObjects, 1000);