Skip to content

Commit

Permalink
use S3AsyncClient.crtCreate
Browse files Browse the repository at this point in the history
  • Loading branch information
agnesgaroux committed Apr 12, 2024
1 parent 162dbd5 commit d28d3d5
Showing 1 changed file with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ package weco.storage_service.bag_replicator
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.{S3AsyncClient, S3Client}
import software.amazon.awssdk.services.s3.presigner.S3Presigner
import software.amazon.awssdk.services.sqs.SqsAsyncClient
import software.amazon.awssdk.transfer.s3.S3TransferManager
Expand All @@ -24,16 +25,8 @@ import weco.storage_service.bag_replicator.replicator.azure.AzureReplicator
import weco.storage_service.bag_replicator.replicator.models.ReplicationSummary
import weco.storage_service.bag_replicator.replicator.s3.S3Replicator
import weco.storage_service.bag_replicator.services.BagReplicatorWorker
import weco.storage_service.config.builders.{
IngestUpdaterBuilder,
OperationNameBuilder,
OutgoingPublisherBuilder
}
import weco.storage_service.ingests.models.{
AmazonS3StorageProvider,
AzureBlobStorageProvider,
StorageProvider
}
import weco.storage_service.config.builders.{IngestUpdaterBuilder, OperationNameBuilder, OutgoingPublisherBuilder}
import weco.storage_service.ingests.models.{AmazonS3StorageProvider, AzureBlobStorageProvider, StorageProvider}
import weco.storage_service.storage.models.IngestStepResult
import weco.typesafe.WellcomeTypesafeApp
import weco.typesafe.config.builders.EnrichConfig._
Expand All @@ -53,8 +46,12 @@ object Main extends WellcomeTypesafeApp {
implicit val s3Client: S3Client =
S3Client.builder().build()


implicit val s3AsyncClient: S3AsyncClient =
S3AsyncClient.crtCreate

implicit val s3TransferManager: S3TransferManager =
S3TransferManager.builder().build()
S3TransferManager.builder().s3Client(s3AsyncClient).build()

implicit val s3Presigner: S3Presigner =
S3Presigner.builder().build()
Expand All @@ -63,7 +60,7 @@ object Main extends WellcomeTypesafeApp {
CloudWatchBuilder.buildCloudWatchMetrics(config)

implicit val sqsClient: SqsAsyncClient =
SqsAsyncClient.builder().build()
SqsAsyncClient.builder().build()use

implicit val lockDao: DynamoLockDao =
DynamoLockDaoBuilder.buildDynamoLockDao(config)
Expand Down

0 comments on commit d28d3d5

Please sign in to comment.