I\'m using AWS Java SDK provided by Amazon to interact with the S3 service.
It seems that by default, the SDK uses virtual-host-style for buckets (i.e. buckets are r
For SDK v2 you can you enable path style by doing this:
public S3Client build() {
final S3Configuration config = S3Configuration.builder()
.pathStyleAccessEnabled(true)
.build();
return S3Client.builder()
.serviceConfiguration(config)
// other set up
.build();
}
Amazon wass planning to deprecate path style access from Sept 2020, but this deprecation has been postponed: https://forums.aws.amazon.com/ann.jspa?annID=6776