From f2f22d2124573ed0e63fd60547f072259bdb8f67 Mon Sep 17 00:00:00 2001 From: Agnes Garoux Date: Mon, 15 Apr 2024 10:45:03 +0100 Subject: [PATCH] use crt builder in Main --- .../scala/weco/storage_service/bag_replicator/Main.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bag_replicator/src/main/scala/weco/storage_service/bag_replicator/Main.scala b/bag_replicator/src/main/scala/weco/storage_service/bag_replicator/Main.scala index 7bc5f2cc4..00ed5cd81 100644 --- a/bag_replicator/src/main/scala/weco/storage_service/bag_replicator/Main.scala +++ b/bag_replicator/src/main/scala/weco/storage_service/bag_replicator/Main.scala @@ -4,7 +4,7 @@ import akka.actor.ActorSystem import com.azure.storage.blob.{BlobServiceClient, BlobServiceClientBuilder} import com.typesafe.config.Config -import software.amazon.awssdk.services.s3.S3Client +import software.amazon.awssdk.services.s3.{S3Client, S3AsyncClient} import software.amazon.awssdk.services.s3.presigner.S3Presigner import software.amazon.awssdk.services.sqs.SqsAsyncClient import software.amazon.awssdk.transfer.s3.S3TransferManager @@ -46,8 +46,11 @@ object Main extends WellcomeTypesafeApp { implicit val s3Client: S3Client = S3Client.builder().build() + implicit val s3AsyncClient: S3AsyncClient = + S3AsyncClient.crtBuilder().build() + implicit val s3TransferManager: S3TransferManager = - S3TransferManager.builder().build() + S3TransferManager.builder().s3Client(s3AsyncClient).build() implicit val s3Presigner: S3Presigner = S3Presigner.builder().build()