code: public byte[] getDerivedSigningKey(String secretAccessKey, String dateStamp, String region, String amazonApi)
              throws SignatureException {
          try {
              byte[] kSecret = (AWS_SIGNATURE_VERSION + secretAccessKey).getBytes(ENCODING);
              byte[] kDate = calculateHmacSHA256(dateStamp, kSecret);
              byte[] kRegion = calculateHmacSHA256(region, kDate);
              byte[] kService = calculateHmacSHA256(amazonApi, kRegion);
  
              return calculateHmacSHA256(AWS_REQUEST_VERSION, kService);
          } catch (NoSuchAlgorithmException | UnsupportedEncodingException | InvalidKeyException e) {
              throw new SignatureException(DERIVED_SIGNING_ERROR + e.getMessage());
          }
      }
docs: Derives a signing key from the AWS secret access key.
  
  @param secretAccessKey Amazon secret a access key.
  @param dateStamp       Credential scope date stamp in "yyyyMMdd" format.
  @param region          Amazon region name.
  @param amazonApi       Amazon service name.
  @return Signing key's bytes. This result is not encoded.