Skip to content

Commit

Permalink
take???
Browse files Browse the repository at this point in the history
  • Loading branch information
agnesgaroux committed Apr 12, 2024
1 parent f34fe6d commit 3858e1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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.{S3Client, S3AsyncClient}
import software.amazon.awssdk.services.s3.presigner.S3Presigner
import software.amazon.awssdk.services.sqs.SqsAsyncClient
import software.amazon.awssdk.transfer.s3.S3TransferManager
Expand Down Expand Up @@ -52,8 +52,12 @@ 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()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package weco.storage.transfer.fixtures

import software.amazon.awssdk.services.s3.internal.crt.S3CrtAsyncClient
import software.amazon.awssdk.services.s3.S3AsyncClient
import software.amazon.awssdk.transfer.s3.S3TransferManager
import weco.storage.fixtures.S3Fixtures

Expand All @@ -9,7 +9,7 @@ import java.net.URI
trait S3TransferManagerFixtures extends S3Fixtures {
def createS3TransferManagerWithEndpoint(endpoint: String): S3TransferManager = {
val s3AsyncClient =
S3CrtAsyncClient.builder()
S3AsyncClient.crtBuilder()
.credentialsProvider(s3Credentials)
.forcePathStyle(true)
.endpointOverride(new URI(endpoint))
Expand Down

0 comments on commit 3858e1a

Please sign in to comment.