Created
September 2, 2021 14:42
-
-
Save mand2/a95dd54290f467838f76438fa323c17c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun createS3DirectoryClient(accessKeyId: String, | |
secretAccessKey: String, | |
region: String): TransferManager { | |
val awsCredentials = AWSStaticCredentialsProvider(BasicAWSCredentials(accessKeyId, secretAccessKey)) | |
val s3Client:AmazonS3 = AmazonS3ClientBuilder.standard() | |
.withCredentials(awsCredentials) | |
.withRegion(Regions.fromName(region)) | |
.build() | |
return TransferManagerBuilder.standard() | |
.withS3Client(s3Client) | |
.build() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment