Skip to content

Commit 02b4e28

Browse files
#31608 Add S3 Setting to Force Path Type Access (#34721)
* SNAPSHOTS: Use Path Style Access in S3 * Use path style access pattern to fix #31608 * closes #31608
1 parent bccc99c commit 02b4e28

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

docs/plugins/repository-s3.asciidoc

+3
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,9 @@ You may further restrict the permissions by specifying a prefix within the bucke
304304
The bucket needs to exist to register a repository for snapshots. If you did not create the bucket then the repository
305305
registration will fail.
306306

307+
Note: Starting in version 7.0, all bucket operations are using the path style access pattern. In previous versions the decision to use virtual hosted style
308+
or path style access was made by the AWS Java SDK.
309+
307310
[[repository-s3-aws-vpc]]
308311
[float]
309312
==== AWS VPC Bandwidth Settings

docs/reference/migration/migrate_7_0/plugins.asciidoc

+7
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ must now be specified in the client settings instead.
2222

2323
See {plugins}/repository-gcs-client.html#repository-gcs-client[Google Cloud Storage Client Settings].
2424

25+
[float]
26+
==== S3 Repository Plugin
27+
28+
* The plugin now uses the path style access pattern for all requests.
29+
In previous versions it was automatically determining whether to use virtual hosted style or path style
30+
access.
31+
2532
[float]
2633
==== Analysis Plugin changes
2734

plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Service.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ AmazonS3 buildClient(final S3ClientSettings clientSettings) {
107107
//
108108
// We do this because directly constructing the client is deprecated (was already deprecated in 1.1.223 too)
109109
// so this change removes that usage of a deprecated API.
110-
builder.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(endpoint, null));
110+
builder.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(endpoint, null))
111+
.enablePathStyleAccess();
111112

112113
return builder.build();
113114
}

0 commit comments

Comments
 (0)