You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2023/03/21 10:19:00 UTC

[camel] 04/08: CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS SQS

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 8cc1c3f580b8e11ed9b64b9b699bebf1677ee71a
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Mar 21 10:39:40 2023 +0100

    CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS SQS
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../main/java/org/apache/camel/component/aws2/sqs/Sqs2Component.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Component.java b/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Component.java
index 070095d3943..284714bfcd5 100644
--- a/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Component.java
+++ b/components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Component.java
@@ -64,7 +64,7 @@ public class Sqs2Component extends DefaultComponent {
 
         //validation of client has to be done after endpoint initialization (in case that sqs client is autowired)
         // - covered by SqsDeadletterWithClientRegistryLocalstackIT
-        if (!configuration.isUseDefaultCredentialsProvider() && configuration.getAmazonSQSClient() == null
+        if (!configuration.isUseDefaultCredentialsProvider()  && !configuration.isUseProfileCredentialsProvider() && configuration.getAmazonSQSClient() == null
                 && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
             throw new IllegalArgumentException("AmazonSQSClient or accessKey and secretKey must be specified.");
         }