Disabling S3 global endpoint usage via configuration #4160
-
Hello, StaticCredentialsProvider credentialsProvider =
StaticCredentialsProvider.create(AwsBasicCredentials.create("...", "..."));
S3Client s3Client = S3Client.builder()
.region(Region.US_EAST_1)
.credentialsProvider(credentialsProvider)
.build();
s3Client.listObjectsV2(ListObjectsV2Request.builder().bucket("my-bucket").build()); As is, the SDK attempts to access host: Is it possible to configure the JVM via environment variables or system properties to configure the SDK to access the bucket host including the region name? e.g.: Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
The Java SDK will use the regional s3 endpoint for all regions except |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
No, there's no system property or environment variable to configure this.
One workaround is to use the regional us-east-1 endpoint in the client's EndpointOverride, but you'd need to make the change in code, there's no environment variable or system property for this either.