code: public String getSignature(String stringToSign, byte[] derivedSigningKey) throws SignatureException {
          try {
              return new String(Hex.encode(calculateHmacSHA256(stringToSign, derivedSigningKey)), ENCODING);
          } catch (NoSuchAlgorithmException | InvalidKeyException | UnsupportedEncodingException e) {
              throw new SignatureException(SIGNATURE_ERROR + e.getMessage());
          }
      }
docs: Calculates the AWS Signature Version 4 by signing (calculates the HmacSHA256) the string-to-sign with the derived key.
  
  @param stringToSign      String-to-sign the includes meta information about the request.
  @param derivedSigningKey Signing key derived from the AWS secret access key.
  @return AWS Signature Version 4.