code: private Signer computeSignerByServiceRegion(
              String serviceName, String regionId,
              String signerRegionOverride,
              boolean isRegionIdAsSignerParam) {
          String signerType = clientConfiguration.getSignerOverride();
          Signer signer = signerType == null
               ? SignerFactory.getSigner(serviceName, regionId)
               : SignerFactory.getSignerByTypeAndService(signerType, serviceName)
               ;
  
          if (signer instanceof RegionAwareSigner) {
               // Overrides the default region computed
               RegionAwareSigner regionAwareSigner = (RegionAwareSigner)signer;
              // (signerRegionOverride != null) means that it is likely to be AWS
              // internal dev work, as "signerRegionOverride" is typically null
               // when used in the external release
               if (signerRegionOverride != null)
                   regionAwareSigner.setRegionName(signerRegionOverride);
               else if (regionId != null && isRegionIdAsSignerParam)
                   regionAwareSigner.setRegionName(regionId);
           }
  
           if (signer instanceof EndpointPrefixAwareSigner) {
               EndpointPrefixAwareSigner endpointPrefixAwareSigner = (EndpointPrefixAwareSigner) signer;
               /*
                * This will be used to compute the region name required for signing
                * if signerRegionOverride is not provided
                */
               endpointPrefixAwareSigner.setEndpointPrefix(endpointPrefix);
           }
  
           return signer;
      }
docs: Returns the signer for the given service name, region id, and the current
  client configuration.
  <p>
  Note, however, the signer returned for S3 is incomplete at this stage as
  the information on the S3 bucket and key is not yet known.
  
  @param regionId
  the region for sending AWS requests
  @param signerRegionOverride
  the overriding signer region; or null if there is none.
  @param isRegionIdAsSignerParam
  true if the "regionId" is used to configure the signer if
  applicable; false if this method is called for the purpose of
  purely setting the communication end point of this AWS client,
  and therefore the "regionId" parameter will not be used
  directly for configuring the signer.