Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternative for TransferManager in AWS sdk Java 2.x

TransferManager class has been removed from AWS sdk Java 2.x. What is the alternative for TransferManager and how it can be used

like image 999
Sunny Gangisetti Avatar asked Jan 03 '20 10:01

Sunny Gangisetti


1 Answers

TransferManager wasn't removed, it was just not implemented in Java 2.X yet. You can see the project to implement TransferManager on their github. It is currently in development and there does not appear to be a timeline of when this will be completed.

You can use the S3Client.putObject method to transfer an object over to your S3 bucket, or if you really must use TransferManager you can include the AWS S3 SDK version 1.X and use TransferManager along with AWS S3 SDK 2.X.

Example:

S3Client s3 = S3Client.builder ().credentialsProvider (/*Your credentials*/).build ();
s3.putObject (/*param1*/, /*param2*/)

Edit as of 2021-08-10: The TransferManager has been released as a Developer Preview. See: https://github.com/aws/aws-sdk-java-v2/tree/master/services-custom/s3-transfer-manager

like image 113
Navigatron Avatar answered Jan 04 '23 08:01

Navigatron