This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 4e20b5157be040c6e241a9bf5252e386a8a3ef40
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Thu Apr 29 07:59:54 2021 +0200

    CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the 
components - DDB Streams component
---
 .../apache/camel/component/aws2/ddbstream/Ddb2StreamComponent.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/components/camel-aws/camel-aws2-ddb/src/main/java/org/apache/camel/component/aws2/ddbstream/Ddb2StreamComponent.java
 
b/components/camel-aws/camel-aws2-ddb/src/main/java/org/apache/camel/component/aws2/ddbstream/Ddb2StreamComponent.java
index c1ca682..b0243ce 100644
--- 
a/components/camel-aws/camel-aws2-ddb/src/main/java/org/apache/camel/component/aws2/ddbstream/Ddb2StreamComponent.java
+++ 
b/components/camel-aws/camel-aws2-ddb/src/main/java/org/apache/camel/component/aws2/ddbstream/Ddb2StreamComponent.java
@@ -55,9 +55,9 @@ public class Ddb2StreamComponent extends DefaultComponent {
         configuration.setTableName(remaining);
         Ddb2StreamEndpoint endpoint = new Ddb2StreamEndpoint(uri, 
configuration, this);
         setProperties(endpoint, parameters);
-        if (configuration.getAmazonDynamoDbStreamsClient() == null
+        if (!configuration.isUseDefaultCredentialsProvider() && 
configuration.getAmazonDynamoDbStreamsClient() == null
                 && (configuration.getAccessKey() == null || 
configuration.getSecretKey() == null)) {
-            throw new IllegalArgumentException("amazonDDBStreamsClient or 
accessKey and secretKey must be specified");
+            throw new IllegalArgumentException("useDefaultCredentialsProvider 
is set to false, amazonDDBStreamsClient or accessKey and secretKey must be 
specified");
         }
         return endpoint;
     }

Reply via email to