Skip to content

Commit 7ae114c

Browse files
committed
Fix region issue
1 parent 8bbdb62 commit 7ae114c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

services-custom/s3-transfer-manager/src/it/java/software/amazon/awssdk/transfer/s3/S3IntegrationTestBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
*/
4545
public class S3IntegrationTestBase extends AwsTestBase {
4646

47-
protected static final Region DEFAULT_REGION = Region.US_WEST_2;
47+
protected static final Region DEFAULT_REGION = Region.US_WEST_1;
4848
/**
4949
* The S3 client for all tests to use.
5050
*/
@@ -92,7 +92,7 @@ private static void createBucket(String bucketName, int retryCount) {
9292
.bucket(bucketName)
9393
.createBucketConfiguration(
9494
CreateBucketConfiguration.builder()
95-
.locationConstraint(BucketLocationConstraint.US_WEST_2)
95+
.locationConstraint(BucketLocationConstraint.US_WEST_1)
9696
.build())
9797
.build());
9898
} catch (S3Exception e) {

services-custom/s3-transfer-manager/src/main/java/software/amazon/awssdk/transfer/s3/internal/DefaultS3CrtAsyncClient.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ private DefaultS3CrtAsyncClient(DefaultS3CrtClientBuilder builder) {
5757
.credentialsProvider(builder.credentialsProvider)
5858
.build();
5959

60-
this.s3AsyncClient = initializeS3AsyncClient();
60+
this.s3AsyncClient = initializeS3AsyncClient(builder);
6161
}
6262

6363
@SdkTestInternalApi
@@ -68,12 +68,14 @@ private DefaultS3CrtAsyncClient(DefaultS3CrtClientBuilder builder) {
6868
this.s3AsyncClient = s3AsyncClient;
6969
}
7070

71-
private S3AsyncClient initializeS3AsyncClient() {
71+
private S3AsyncClient initializeS3AsyncClient(DefaultS3CrtClientBuilder builder) {
7272
return S3AsyncClient.builder()
7373
// Disable checksum, retry policy and signer because they are handled in crt
7474
.serviceConfiguration(S3Configuration.builder()
7575
.checksumValidationEnabled(false)
7676
.build())
77+
.region(builder.region)
78+
.credentialsProvider(builder.credentialsProvider)
7779
.overrideConfiguration(o -> o.putAdvancedOption(SdkAdvancedClientOption.SIGNER,
7880
new NoOpSigner())
7981
.retryPolicy(RetryPolicy.none())

0 commit comments

Comments
 (0)