code: public static AWSCredentialsProvider getCredentialsProvider(
              AmazonWebServiceRequest req,
              AWSCredentialsProvider base) {
  
          if (req != null && req.getRequestCredentialsProvider() != null) {
              return req.getRequestCredentialsProvider();
          }
          return base;
      }
docs: Returns the credentials provider that will be used to fetch the
  credentials when signing the request. Request specific credentials
  takes precedence over the credentials/credentials provider set in the
  client.