Skip to content

Commit 1e51dcd

Browse files
committed
Implementation details of RegionFromEndpointGuesser
1 parent 8f83362 commit 1e51dcd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/RegionFromEndpointGuesser.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
* Simple mapping from S3 endpoint hostnames to AWS region names, in case the user does not specify a region.
2727
*/
2828
class RegionFromEndpointGuesser {
29+
/*
30+
* Loads JAR resource "regions_by_endpoint.txt" into a map from S3 endpoint hostnames to AWS region names, in case the user specifies a
31+
* regional endpoint but not a region. This allows Elasticsearch to guess an appropriate AWS region name, and keep working, if a user
32+
* does not specify one. This is a best-effort attempt for backwards compatibility: AWS SDK V1 would extrapolate the correct region but
33+
* V2 considers it a fatal error not to be told the region name explicitly.
34+
*/
2935

3036
private static final Map<String, String> regionsByEndpoint;
3137

0 commit comments

Comments
 (0)