AWSCredentialsProvider credentialsProviderForStream(String system, String stream) {
    // Try to load credentials in the following order:
    // 1. Access key from the config and passed in secretKey
    // 2. From the default credential provider chain (environment variables, system properties, AWS profile file, etc)
    return new AWSCredentialsProviderChain(
        new KinesisAWSCredentialsProvider(getStreamAccessKey(system, stream), getStreamSecretKey(system, stream)),
        new DefaultAWSCredentialsProviderChain());
  }
Get the appropriate CredentialProvider for a given system stream.
@param system name of the system
@param stream name of the stream
@return AWSCredentialsProvider
samza-aws/src/main/java/org/apache/samza/system/kinesis/KinesisConfig.java