Skip to content

Commit

Permalink
Merge pull request #1993 from HubSpot/aws_builder_update
Browse files Browse the repository at this point in the history
Revert AWS builder update for now
  • Loading branch information
ssalinas authored Aug 12, 2019
2 parents f8dd80f + f16a92b commit 0b28e59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.slf4j.Logger;

import com.amazonaws.ClientConfiguration;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3Client;
Expand Down Expand Up @@ -75,10 +74,7 @@ private void downloadThrows(final S3Artifact s3Artifact, final Path downloadTo)
clientConfiguration.setSignerOverride("S3SignerType");
}

final AmazonS3 s3Client = AmazonS3Client.builder()
.withCredentials(new AWSStaticCredentialsProvider(getCredentialsForBucket(s3Artifact.getS3Bucket())))
.withClientConfiguration(clientConfiguration)
.build();
final AmazonS3 s3Client = new AmazonS3Client(getCredentialsForBucket(s3Artifact.getS3Bucket()), clientConfiguration);

if (configuration.getS3Endpoint().isPresent()) {
s3Client.setEndpoint(configuration.getS3Endpoint().get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;

import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3Client;
Expand Down Expand Up @@ -50,9 +49,7 @@ public class SingularityS3Uploader extends SingularityUploader {
credentials = new BasicAWSCredentials(uploadMetadata.getS3AccessKey().get(), uploadMetadata.getS3SecretKey().get());
}

this.s3Client = AmazonS3Client.builder()
.withCredentials(new AWSStaticCredentialsProvider(credentials))
.build();
this.s3Client = new AmazonS3Client(credentials);
}

@Override
Expand Down

0 comments on commit 0b28e59

Please sign in to comment.