private String stripProtocol(final String endpoint) {
        final int protocolIndex = endpoint.indexOf("://");
        return protocolIndex >= 0 ? endpoint.substring(protocolIndex + "://".length()) : endpoint;
    }
Uses region metdata to construct an endpoint for a specific service
aws-java-sdk-core/src/main/java/com/amazonaws/internal/DefaultServiceEndpointBuilder.java