public static Region guessRegionForEndpoint(String hostname) {
        return guessRegionForEndpoint(hostname, null);
    }
Attempt to convert the provided hostname into a region, returning null if the conversion fails.
aws-java-sdk-core/src/main/java/com/amazonaws/regions/EndpointToRegion.java