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