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 3dd2701e05235fa38863428c3538e896522e1be5 Author: Andrea Cosentino <[email protected]> AuthorDate: Fri Apr 30 15:35:31 2021 +0200 CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the components - ECS Component --- .../main/java/org/apache/camel/component/aws2/ecs/ECS2Component.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Component.java b/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Component.java index 8d0134c..8047f6e 100644 --- a/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Component.java +++ b/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Component.java @@ -52,9 +52,9 @@ public class ECS2Component extends DefaultComponent { ECS2Configuration configuration = this.configuration != null ? this.configuration.copy() : new ECS2Configuration(); ECS2Endpoint endpoint = new ECS2Endpoint(uri, this, configuration); setProperties(endpoint, parameters); - if (configuration.getEcsClient() == null + if (!configuration.isUseDefaultCredentialsProvider() && configuration.getEcsClient() == null && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) { - throw new IllegalArgumentException("Amazon ecs client or accessKey and secretKey must be specified"); + throw new IllegalArgumentException("useDefaultCredentialsProvider is set to false, Amazon ecs client or accessKey and secretKey must be specified"); } return endpoint;
