code: function getSigningKey(
      credentials,
      date,
      region,
      service,
      shouldCache
    ) {
      var credsIdentifier = AWS.util.crypto
        .hmac(credentials.secretAccessKey, credentials.accessKeyId, 'base64');
      var cacheKey = [credsIdentifier, date, region, service].join('_');
      shouldCache = shouldCache !== false;
      if (shouldCache && (cacheKey in cachedSecret)) {
        return cachedSecret[cacheKey];
      }
  
      var kDate = AWS.util.crypto.hmac(
        'AWS4' + credentials.secretAccessKey,
        date,
        'buffer'
      );
      var kRegion = AWS.util.crypto.hmac(kDate, region, 'buffer');
      var kService = AWS.util.crypto.hmac(kRegion, service, 'buffer');
  
      var signingKey = AWS.util.crypto.hmac(kService, v4Identifier, 'buffer');
      if (shouldCache) {
        cachedSecret[cacheKey] = signingKey;
        cacheQueue.push(cacheKey);
        if (cacheQueue.length > maxCacheEntries) {
          // remove the oldest entry (not the least recently used)
          delete cachedSecret[cacheQueue.shift()];
        }
      }
  
      return signingKey;
    }
docs: @api private
  
  @param credentials [Credentials]
  @param date [String]
  @param region [String]
  @param service [String]
  @param shouldCache [Boolean]
  @return [String]