Github user tzulitai commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2260#discussion_r71062495
  
    --- Diff: 
flink-streaming-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/AWSUtil.java
 ---
    @@ -50,8 +50,14 @@ public static AmazonKinesisClient 
createKinesisClient(Properties configProps) {
                awsClientConfig.setUserAgent("Apache Flink " + 
EnvironmentInformation.getVersion() +
                        " (" + 
EnvironmentInformation.getRevisionInformation().commitId + ") Kinesis 
Connector");
     
    -           AmazonKinesisClient client =
    -                   new 
AmazonKinesisClient(AWSUtil.getCredentialsProvider(configProps).getCredentials(),
 awsClientConfig);
    +           AWSCredentialsProvider credentialsProvider = 
AWSUtil.getCredentialsProvider(configProps);
    +
    +           if (credentialsProvider != null) {
    +                   AmazonKinesisClient client =
    +                           new 
AmazonKinesisClient(credentialsProvider.getCredentials(), awsClientConfig);
    +           } else {
    +                   AmazonKinesisClient client = new 
AmazonKinesisClient(awsClientConfig);
    +           }
    --- End diff --
    
    No problem at all :) Thank you for the quick fix.
    Can you also revert back the declaration of `credentialsProvider`? I don't 
think it is required to declare this variable outside the scope.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to