Drop use of deprecated interface

This commit is contained in:
Michael Walker 2018-02-09 15:48:20 +00:00
parent 9bb7576f0b
commit a627c7e9b3

View file

@ -1,8 +1,9 @@
package uk.ac.ic.wlgitbridge.bridge.swap.store;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3Client;
import com.amazonaws.services.s3.AmazonS3ClientBuilder;
import com.amazonaws.services.s3.model.*;
import java.io.InputStream;
@ -29,7 +30,7 @@ public class S3SwapStore implements SwapStore {
String secret,
String bucketName
) {
s3 = new AmazonS3Client(new BasicAWSCredentials(accessKey, secret));
s3 = AmazonS3ClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(new BasicAWSCredentials(accessKey, secret))).build();
this.bucketName = bucketName;
}