Search code examples
androidamazon-web-servicesamazon-s3transferacceleration

How to Upload a Single Object to a Transfer Acceleration Enabled Bucket by Android SDK


I use Android SDK to upload files to AWS S3, and want enable transfer accelerate. I have read transfer acceleration examples but only found example for Java. I tried the Java code on Android but with no success:

AmazonS3Client s3Client = new AmazonS3Client(credentials, clientConfiguration);
S3ClientOptions s3ClientOptions = new S3ClientOptions();
s3ClientOptions.setAccelerateModeEnabled(true);
s3Client.setS3ClientOptions(s3ClientOptions);

Cannot resolve method 'setAccelerateModeEnabled'! The version of my aws-android-sdk-s3 is 2.2.16.

Is Transfer Acceleration supported on Android SDK? If yes, how should I do? Thanks.


Solution

  • AWS Mobile SDK for Android v2.2.17 is released today. This release adds support for Amazon S3 transfer acceleration, cross-region replication and list objects v2. For more information, see http://aws.amazon.com/releasenotes/5606404750751710.

    The above code will work after you upgrade the SDK to the latest version.