code: private String resolveRegion(String endpointPrefix, String serviceSigningName) {
  
          return AwsHostNameUtils.parseRegionName(request.getEndpoint().getHost(),
                  endpointPrefix != null ? endpointPrefix : serviceSigningName);
      }
docs: /*
  Ideally, we should be using endpoint prefix to parse the region from host.
  
  Previously we were using service signing name to parse region. It is possible that
  endpoint prefix is null if customers are still using older clients. So using
  service signing name as alternative will prevent any behavior breaking change.