From 98d30317bbb1b2ff29885f3819b4ec45d0e9ca95 Mon Sep 17 00:00:00 2001 From: rfresh2 <89827146+rfresh2@users.noreply.github.com> Date: Mon, 27 Nov 2023 01:49:04 -0800 Subject: [PATCH] specify region --- src/main/java/vc/config/RemoteDatabaseBackup.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/vc/config/RemoteDatabaseBackup.java b/src/main/java/vc/config/RemoteDatabaseBackup.java index d077470..5add978 100644 --- a/src/main/java/vc/config/RemoteDatabaseBackup.java +++ b/src/main/java/vc/config/RemoteDatabaseBackup.java @@ -6,6 +6,7 @@ import org.springframework.stereotype.Component; import software.amazon.awssdk.auth.credentials.AwsBasicCredentials; import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider; +import software.amazon.awssdk.regions.Region; import software.amazon.awssdk.services.s3.S3Client; import java.net.URI; @@ -25,6 +26,7 @@ public RemoteDatabaseBackup( this.bucketName = bucketName; s3Client = S3Client.builder() .endpointOverride(URI.create(bucketUrl)) + .region(Region.of("auto")) .credentialsProvider(StaticCredentialsProvider.create(AwsBasicCredentials.create(awsAccessKeyId, awsSecretAccessKey))) .build(); }