code: protected String createStringToSign(String canonicalRequest,
              AWS4SignerRequestParams signerParams) {
  
          final StringBuilder stringToSignBuilder = new StringBuilder(
                  signerParams.getSigningAlgorithm());
          stringToSignBuilder.append(LINE_SEPARATOR)
                  .append(signerParams.getFormattedSigningDateTime())
                  .append(LINE_SEPARATOR)
                  .append(signerParams.getScope())
                  .append(LINE_SEPARATOR)
                  .append(BinaryUtils.toHex(hash(canonicalRequest)));
  
          final String stringToSign = stringToSignBuilder.toString();
  
          if (log.isDebugEnabled())
              log.debug("AWS4 String to Sign: '\"" + stringToSign + "\"");
  
          return stringToSign;
      }
docs: Step 2 of the AWS Signature version 4 calculation. Refer to
  http://docs.aws
  .amazon.com/general/latest/gr/sigv4-create-string-to-sign.html.