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 8a0a0a3fa2d3e5863c704682509fd725a0e5290f Author: Andrea Cosentino <[email protected]> AuthorDate: Mon Apr 24 10:25:33 2023 +0200 CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS SNS Signed-off-by: Andrea Cosentino <[email protected]> --- .../main/java/org/apache/camel/component/aws2/sns/Sns2Component.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/camel-aws/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Component.java b/components/camel-aws/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Component.java index 944ecb1ac66..2c19080b32b 100644 --- a/components/camel-aws/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Component.java +++ b/components/camel-aws/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Component.java @@ -71,9 +71,9 @@ public class Sns2Component extends DefaultComponent { Sns2Endpoint endpoint = new Sns2Endpoint(uri, this, epConfiguration); setProperties(endpoint, nonTransientParameters); - if (!epConfiguration.isUseDefaultCredentialsProvider() && epConfiguration.getAmazonSNSClient() == null + if (!epConfiguration.isUseDefaultCredentialsProvider() && !epConfiguration.isUseProfileCredentialsProvider() && epConfiguration.getAmazonSNSClient() == null && (epConfiguration.getAccessKey() == null || epConfiguration.getSecretKey() == null)) { - throw new IllegalArgumentException("AmazonSNSClient or accessKey and secretKey must be specified"); + throw new IllegalArgumentException("useDefaultCredentialsProvider is set to false, useProfileCredentialsProvider is set to false, AmazonSNSClient or accessKey and secretKey must be specified"); } return endpoint;
