Skip to content

Commit

Permalink
specify region
Browse files Browse the repository at this point in the history
  • Loading branch information
rfresh2 committed Nov 27, 2023
1 parent 9165582 commit 98d3031
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/vc/config/RemoteDatabaseBackup.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
}
Expand Down

0 comments on commit 98d3031

Please sign in to comment.