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 c34cdefecb4afe24f5bc5c0052894d38e557a9da
Author: Andrea Cosentino <[email protected]>
AuthorDate: Fri Jul 29 13:45:10 2022 +0200

    CAMEL-15566 - Create a AWS Cloudtrail component
---
 catalog/camel-allcomponents/pom.xml                |   4 +
 components/camel-aws/camel-aws-cloudtrail/pom.xml  |  91 ++++++++
 .../cloudtrail/CloudtrailComponentConfigurer.java  | 151 +++++++++++++
 .../cloudtrail/CloudtrailEndpointConfigurer.java   | 243 +++++++++++++++++++++
 .../cloudtrail/CloudtrailEndpointUriFactory.java   | 106 +++++++++
 .../services/org/apache/camel/component.properties |   7 +
 .../org/apache/camel/component/aws-cloudtrail      |   2 +
 .../org/apache/camel/component/aws-kinesis         |   2 +
 .../camel/configurer/aws-cloudtrail-component      |   2 +
 .../camel/configurer/aws-cloudtrail-endpoint       |   2 +
 .../camel/urifactory/aws-cloudtrail-endpoint       |   2 +
 .../component/aws/cloudtrail/aws-cloudtrail.json   |  79 +++++++
 .../src/main/docs/aws-cloudtrail-component.adoc    |  49 +++++
 .../aws/cloudtrail/CloudtrailComponent.java        |  66 ++++++
 .../aws/cloudtrail/CloudtrailConfiguration.java    | 192 ++++++++++++++++
 .../aws/cloudtrail/CloudtrailConstants.java        |  20 ++
 .../aws/cloudtrail/CloudtrailConsumer.java         | 107 +++++++++
 .../aws/cloudtrail/CloudtrailEndpoint.java         |  85 +++++++
 .../cloudtrail/client/CloudtrailClientFactory.java |  41 ++++
 .../client/CloudtrailInternalClient.java           |  33 +++
 .../impl/CloudtrailClientIAMOptimizedImpl.java     |  89 ++++++++
 .../client/impl/CloudtrailClientStandardImpl.java  | 104 +++++++++
 .../cloudtrail/CloudtrailClientFactoryTest.java    |  51 +++++
 .../src/test/resources/log4j2.properties           |  28 +++
 parent/pom.xml                                     |   5 +
 25 files changed, 1561 insertions(+)

diff --git a/catalog/camel-allcomponents/pom.xml 
b/catalog/camel-allcomponents/pom.xml
index 15893513e4b..e218086ac22 100644
--- a/catalog/camel-allcomponents/pom.xml
+++ b/catalog/camel-allcomponents/pom.xml
@@ -109,6 +109,10 @@
                        <groupId>org.apache.camel</groupId>
                        <artifactId>camel-avro</artifactId>
                </dependency>
+               <dependency>
+                       <groupId>org.apache.camel</groupId>
+                       <artifactId>camel-aws-cloudtrail</artifactId>
+               </dependency>
                <dependency>
                        <groupId>org.apache.camel</groupId>
                        <artifactId>camel-aws-secrets-manager</artifactId>
diff --git a/components/camel-aws/camel-aws-cloudtrail/pom.xml 
b/components/camel-aws/camel-aws-cloudtrail/pom.xml
new file mode 100644
index 00000000000..e1f39be3640
--- /dev/null
+++ b/components/camel-aws/camel-aws-cloudtrail/pom.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-aws-parent</artifactId>
+        <version>3.19.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>camel-aws-cloudtrail</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Camel :: AWS Cloutrail</name>
+    <description>A Camel Amazon Cloudtrail Web Service Component Version 
2</description>
+
+    <properties>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-support</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>software.amazon.awssdk</groupId>
+            <artifactId>cloudtrail</artifactId>
+            <version>${aws-java-sdk2-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>software.amazon.awssdk</groupId>
+            <artifactId>apache-client</artifactId>
+            <version>${aws-java-sdk2-version}</version>
+        </dependency>
+
+        <!-- for testing -->
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-test-spring-junit5</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-core-catalog</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-slf4j-impl</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-junit-jupiter</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.hamcrest</groupId>
+            <artifactId>hamcrest</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+
+        <!-- test infra -->
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-test-infra-aws-v2</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/generated/java/org/apache/camel/component/aws/cloudtrail/CloudtrailComponentConfigurer.java
 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/java/org/apache/camel/component/aws/cloudtrail/CloudtrailComponentConfigurer.java
new file mode 100644
index 00000000000..c40e2c76691
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/java/org/apache/camel/component/aws/cloudtrail/CloudtrailComponentConfigurer.java
@@ -0,0 +1,151 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.aws.cloudtrail;
+
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
+import org.apache.camel.spi.PropertyConfigurerGetter;
+import org.apache.camel.spi.ConfigurerStrategy;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.util.CaseInsensitiveMap;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@SuppressWarnings("unchecked")
+public class CloudtrailComponentConfigurer extends PropertyConfigurerSupport 
implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
+
+    private org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration 
getOrCreateConfiguration(CloudtrailComponent target) {
+        if (target.getConfiguration() == null) {
+            target.setConfiguration(new 
org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration());
+        }
+        return target.getConfiguration();
+    }
+
+    @Override
+    public boolean configure(CamelContext camelContext, Object obj, String 
name, Object value, boolean ignoreCase) {
+        CloudtrailComponent target = (CloudtrailComponent) obj;
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "accesskey":
+        case "accessKey": 
getOrCreateConfiguration(target).setAccessKey(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "autowiredenabled":
+        case "autowiredEnabled": 
target.setAutowiredEnabled(property(camelContext, boolean.class, value)); 
return true;
+        case "bridgeerrorhandler":
+        case "bridgeErrorHandler": 
target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); 
return true;
+        case "cloudtrailclient":
+        case "cloudTrailClient": 
getOrCreateConfiguration(target).setCloudTrailClient(property(camelContext, 
software.amazon.awssdk.services.cloudtrail.CloudTrailClient.class, value)); 
return true;
+        case "configuration": target.setConfiguration(property(camelContext, 
org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration.class, 
value)); return true;
+        case "eventsource":
+        case "eventSource": 
getOrCreateConfiguration(target).setEventSource(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "lazystartproducer":
+        case "lazyStartProducer": 
target.setLazyStartProducer(property(camelContext, boolean.class, value)); 
return true;
+        case "maxresults":
+        case "maxResults": 
getOrCreateConfiguration(target).setMaxResults(property(camelContext, 
int.class, value)); return true;
+        case "overrideendpoint":
+        case "overrideEndpoint": 
getOrCreateConfiguration(target).setOverrideEndpoint(property(camelContext, 
boolean.class, value)); return true;
+        case "proxyhost":
+        case "proxyHost": 
getOrCreateConfiguration(target).setProxyHost(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "proxyport":
+        case "proxyPort": 
getOrCreateConfiguration(target).setProxyPort(property(camelContext, 
java.lang.Integer.class, value)); return true;
+        case "proxyprotocol":
+        case "proxyProtocol": 
getOrCreateConfiguration(target).setProxyProtocol(property(camelContext, 
software.amazon.awssdk.core.Protocol.class, value)); return true;
+        case "region": 
getOrCreateConfiguration(target).setRegion(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "secretkey":
+        case "secretKey": 
getOrCreateConfiguration(target).setSecretKey(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "trustallcertificates":
+        case "trustAllCertificates": 
getOrCreateConfiguration(target).setTrustAllCertificates(property(camelContext, 
boolean.class, value)); return true;
+        case "uriendpointoverride":
+        case "uriEndpointOverride": 
getOrCreateConfiguration(target).setUriEndpointOverride(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "usedefaultcredentialsprovider":
+        case "useDefaultCredentialsProvider": 
getOrCreateConfiguration(target).setUseDefaultCredentialsProvider(property(camelContext,
 boolean.class, value)); return true;
+        default: return false;
+        }
+    }
+
+    @Override
+    public String[] getAutowiredNames() {
+        return new String[]{"cloudTrailClient"};
+    }
+
+    @Override
+    public Class<?> getOptionType(String name, boolean ignoreCase) {
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "accesskey":
+        case "accessKey": return java.lang.String.class;
+        case "autowiredenabled":
+        case "autowiredEnabled": return boolean.class;
+        case "bridgeerrorhandler":
+        case "bridgeErrorHandler": return boolean.class;
+        case "cloudtrailclient":
+        case "cloudTrailClient": return 
software.amazon.awssdk.services.cloudtrail.CloudTrailClient.class;
+        case "configuration": return 
org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration.class;
+        case "eventsource":
+        case "eventSource": return java.lang.String.class;
+        case "lazystartproducer":
+        case "lazyStartProducer": return boolean.class;
+        case "maxresults":
+        case "maxResults": return int.class;
+        case "overrideendpoint":
+        case "overrideEndpoint": return boolean.class;
+        case "proxyhost":
+        case "proxyHost": return java.lang.String.class;
+        case "proxyport":
+        case "proxyPort": return java.lang.Integer.class;
+        case "proxyprotocol":
+        case "proxyProtocol": return 
software.amazon.awssdk.core.Protocol.class;
+        case "region": return java.lang.String.class;
+        case "secretkey":
+        case "secretKey": return java.lang.String.class;
+        case "trustallcertificates":
+        case "trustAllCertificates": return boolean.class;
+        case "uriendpointoverride":
+        case "uriEndpointOverride": return java.lang.String.class;
+        case "usedefaultcredentialsprovider":
+        case "useDefaultCredentialsProvider": return boolean.class;
+        default: return null;
+        }
+    }
+
+    @Override
+    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
+        CloudtrailComponent target = (CloudtrailComponent) obj;
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "accesskey":
+        case "accessKey": return 
getOrCreateConfiguration(target).getAccessKey();
+        case "autowiredenabled":
+        case "autowiredEnabled": return target.isAutowiredEnabled();
+        case "bridgeerrorhandler":
+        case "bridgeErrorHandler": return target.isBridgeErrorHandler();
+        case "cloudtrailclient":
+        case "cloudTrailClient": return 
getOrCreateConfiguration(target).getCloudTrailClient();
+        case "configuration": return target.getConfiguration();
+        case "eventsource":
+        case "eventSource": return 
getOrCreateConfiguration(target).getEventSource();
+        case "lazystartproducer":
+        case "lazyStartProducer": return target.isLazyStartProducer();
+        case "maxresults":
+        case "maxResults": return 
getOrCreateConfiguration(target).getMaxResults();
+        case "overrideendpoint":
+        case "overrideEndpoint": return 
getOrCreateConfiguration(target).isOverrideEndpoint();
+        case "proxyhost":
+        case "proxyHost": return 
getOrCreateConfiguration(target).getProxyHost();
+        case "proxyport":
+        case "proxyPort": return 
getOrCreateConfiguration(target).getProxyPort();
+        case "proxyprotocol":
+        case "proxyProtocol": return 
getOrCreateConfiguration(target).getProxyProtocol();
+        case "region": return getOrCreateConfiguration(target).getRegion();
+        case "secretkey":
+        case "secretKey": return 
getOrCreateConfiguration(target).getSecretKey();
+        case "trustallcertificates":
+        case "trustAllCertificates": return 
getOrCreateConfiguration(target).isTrustAllCertificates();
+        case "uriendpointoverride":
+        case "uriEndpointOverride": return 
getOrCreateConfiguration(target).getUriEndpointOverride();
+        case "usedefaultcredentialsprovider":
+        case "useDefaultCredentialsProvider": return 
getOrCreateConfiguration(target).isUseDefaultCredentialsProvider();
+        default: return null;
+        }
+    }
+}
+
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/generated/java/org/apache/camel/component/aws/cloudtrail/CloudtrailEndpointConfigurer.java
 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/java/org/apache/camel/component/aws/cloudtrail/CloudtrailEndpointConfigurer.java
new file mode 100644
index 00000000000..9ac56aa08bf
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/java/org/apache/camel/component/aws/cloudtrail/CloudtrailEndpointConfigurer.java
@@ -0,0 +1,243 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.aws.cloudtrail;
+
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
+import org.apache.camel.spi.PropertyConfigurerGetter;
+import org.apache.camel.spi.ConfigurerStrategy;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.util.CaseInsensitiveMap;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@SuppressWarnings("unchecked")
+public class CloudtrailEndpointConfigurer extends PropertyConfigurerSupport 
implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
+
+    @Override
+    public boolean configure(CamelContext camelContext, Object obj, String 
name, Object value, boolean ignoreCase) {
+        CloudtrailEndpoint target = (CloudtrailEndpoint) obj;
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "accesskey":
+        case "accessKey": 
target.getConfiguration().setAccessKey(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "backofferrorthreshold":
+        case "backoffErrorThreshold": 
target.setBackoffErrorThreshold(property(camelContext, int.class, value)); 
return true;
+        case "backoffidlethreshold":
+        case "backoffIdleThreshold": 
target.setBackoffIdleThreshold(property(camelContext, int.class, value)); 
return true;
+        case "backoffmultiplier":
+        case "backoffMultiplier": 
target.setBackoffMultiplier(property(camelContext, int.class, value)); return 
true;
+        case "bridgeerrorhandler":
+        case "bridgeErrorHandler": 
target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); 
return true;
+        case "cloudtrailclient":
+        case "cloudTrailClient": 
target.getConfiguration().setCloudTrailClient(property(camelContext, 
software.amazon.awssdk.services.cloudtrail.CloudTrailClient.class, value)); 
return true;
+        case "delay": target.setDelay(property(camelContext, long.class, 
value)); return true;
+        case "eventsource":
+        case "eventSource": 
target.getConfiguration().setEventSource(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "exceptionhandler":
+        case "exceptionHandler": 
target.setExceptionHandler(property(camelContext, 
org.apache.camel.spi.ExceptionHandler.class, value)); return true;
+        case "exchangepattern":
+        case "exchangePattern": 
target.setExchangePattern(property(camelContext, 
org.apache.camel.ExchangePattern.class, value)); return true;
+        case "greedy": target.setGreedy(property(camelContext, boolean.class, 
value)); return true;
+        case "initialdelay":
+        case "initialDelay": target.setInitialDelay(property(camelContext, 
long.class, value)); return true;
+        case "lazystartproducer":
+        case "lazyStartProducer": 
target.setLazyStartProducer(property(camelContext, boolean.class, value)); 
return true;
+        case "maxresults":
+        case "maxResults": 
target.getConfiguration().setMaxResults(property(camelContext, int.class, 
value)); return true;
+        case "overrideendpoint":
+        case "overrideEndpoint": 
target.getConfiguration().setOverrideEndpoint(property(camelContext, 
boolean.class, value)); return true;
+        case "pollstrategy":
+        case "pollStrategy": target.setPollStrategy(property(camelContext, 
org.apache.camel.spi.PollingConsumerPollStrategy.class, value)); return true;
+        case "proxyhost":
+        case "proxyHost": 
target.getConfiguration().setProxyHost(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "proxyport":
+        case "proxyPort": 
target.getConfiguration().setProxyPort(property(camelContext, 
java.lang.Integer.class, value)); return true;
+        case "proxyprotocol":
+        case "proxyProtocol": 
target.getConfiguration().setProxyProtocol(property(camelContext, 
software.amazon.awssdk.core.Protocol.class, value)); return true;
+        case "region": 
target.getConfiguration().setRegion(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "repeatcount":
+        case "repeatCount": target.setRepeatCount(property(camelContext, 
long.class, value)); return true;
+        case "runlogginglevel":
+        case "runLoggingLevel": 
target.setRunLoggingLevel(property(camelContext, 
org.apache.camel.LoggingLevel.class, value)); return true;
+        case "scheduledexecutorservice":
+        case "scheduledExecutorService": 
target.setScheduledExecutorService(property(camelContext, 
java.util.concurrent.ScheduledExecutorService.class, value)); return true;
+        case "scheduler": target.setScheduler(property(camelContext, 
java.lang.Object.class, value)); return true;
+        case "schedulerproperties":
+        case "schedulerProperties": 
target.setSchedulerProperties(property(camelContext, java.util.Map.class, 
value)); return true;
+        case "secretkey":
+        case "secretKey": 
target.getConfiguration().setSecretKey(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "sendemptymessagewhenidle":
+        case "sendEmptyMessageWhenIdle": 
target.setSendEmptyMessageWhenIdle(property(camelContext, boolean.class, 
value)); return true;
+        case "startscheduler":
+        case "startScheduler": target.setStartScheduler(property(camelContext, 
boolean.class, value)); return true;
+        case "timeunit":
+        case "timeUnit": target.setTimeUnit(property(camelContext, 
java.util.concurrent.TimeUnit.class, value)); return true;
+        case "trustallcertificates":
+        case "trustAllCertificates": 
target.getConfiguration().setTrustAllCertificates(property(camelContext, 
boolean.class, value)); return true;
+        case "uriendpointoverride":
+        case "uriEndpointOverride": 
target.getConfiguration().setUriEndpointOverride(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "usedefaultcredentialsprovider":
+        case "useDefaultCredentialsProvider": 
target.getConfiguration().setUseDefaultCredentialsProvider(property(camelContext,
 boolean.class, value)); return true;
+        case "usefixeddelay":
+        case "useFixedDelay": target.setUseFixedDelay(property(camelContext, 
boolean.class, value)); return true;
+        default: return false;
+        }
+    }
+
+    @Override
+    public String[] getAutowiredNames() {
+        return new String[]{"cloudTrailClient"};
+    }
+
+    @Override
+    public Class<?> getOptionType(String name, boolean ignoreCase) {
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "accesskey":
+        case "accessKey": return java.lang.String.class;
+        case "backofferrorthreshold":
+        case "backoffErrorThreshold": return int.class;
+        case "backoffidlethreshold":
+        case "backoffIdleThreshold": return int.class;
+        case "backoffmultiplier":
+        case "backoffMultiplier": return int.class;
+        case "bridgeerrorhandler":
+        case "bridgeErrorHandler": return boolean.class;
+        case "cloudtrailclient":
+        case "cloudTrailClient": return 
software.amazon.awssdk.services.cloudtrail.CloudTrailClient.class;
+        case "delay": return long.class;
+        case "eventsource":
+        case "eventSource": return java.lang.String.class;
+        case "exceptionhandler":
+        case "exceptionHandler": return 
org.apache.camel.spi.ExceptionHandler.class;
+        case "exchangepattern":
+        case "exchangePattern": return org.apache.camel.ExchangePattern.class;
+        case "greedy": return boolean.class;
+        case "initialdelay":
+        case "initialDelay": return long.class;
+        case "lazystartproducer":
+        case "lazyStartProducer": return boolean.class;
+        case "maxresults":
+        case "maxResults": return int.class;
+        case "overrideendpoint":
+        case "overrideEndpoint": return boolean.class;
+        case "pollstrategy":
+        case "pollStrategy": return 
org.apache.camel.spi.PollingConsumerPollStrategy.class;
+        case "proxyhost":
+        case "proxyHost": return java.lang.String.class;
+        case "proxyport":
+        case "proxyPort": return java.lang.Integer.class;
+        case "proxyprotocol":
+        case "proxyProtocol": return 
software.amazon.awssdk.core.Protocol.class;
+        case "region": return java.lang.String.class;
+        case "repeatcount":
+        case "repeatCount": return long.class;
+        case "runlogginglevel":
+        case "runLoggingLevel": return org.apache.camel.LoggingLevel.class;
+        case "scheduledexecutorservice":
+        case "scheduledExecutorService": return 
java.util.concurrent.ScheduledExecutorService.class;
+        case "scheduler": return java.lang.Object.class;
+        case "schedulerproperties":
+        case "schedulerProperties": return java.util.Map.class;
+        case "secretkey":
+        case "secretKey": return java.lang.String.class;
+        case "sendemptymessagewhenidle":
+        case "sendEmptyMessageWhenIdle": return boolean.class;
+        case "startscheduler":
+        case "startScheduler": return boolean.class;
+        case "timeunit":
+        case "timeUnit": return java.util.concurrent.TimeUnit.class;
+        case "trustallcertificates":
+        case "trustAllCertificates": return boolean.class;
+        case "uriendpointoverride":
+        case "uriEndpointOverride": return java.lang.String.class;
+        case "usedefaultcredentialsprovider":
+        case "useDefaultCredentialsProvider": return boolean.class;
+        case "usefixeddelay":
+        case "useFixedDelay": return boolean.class;
+        default: return null;
+        }
+    }
+
+    @Override
+    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
+        CloudtrailEndpoint target = (CloudtrailEndpoint) obj;
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "accesskey":
+        case "accessKey": return target.getConfiguration().getAccessKey();
+        case "backofferrorthreshold":
+        case "backoffErrorThreshold": return target.getBackoffErrorThreshold();
+        case "backoffidlethreshold":
+        case "backoffIdleThreshold": return target.getBackoffIdleThreshold();
+        case "backoffmultiplier":
+        case "backoffMultiplier": return target.getBackoffMultiplier();
+        case "bridgeerrorhandler":
+        case "bridgeErrorHandler": return target.isBridgeErrorHandler();
+        case "cloudtrailclient":
+        case "cloudTrailClient": return 
target.getConfiguration().getCloudTrailClient();
+        case "delay": return target.getDelay();
+        case "eventsource":
+        case "eventSource": return target.getConfiguration().getEventSource();
+        case "exceptionhandler":
+        case "exceptionHandler": return target.getExceptionHandler();
+        case "exchangepattern":
+        case "exchangePattern": return target.getExchangePattern();
+        case "greedy": return target.isGreedy();
+        case "initialdelay":
+        case "initialDelay": return target.getInitialDelay();
+        case "lazystartproducer":
+        case "lazyStartProducer": return target.isLazyStartProducer();
+        case "maxresults":
+        case "maxResults": return target.getConfiguration().getMaxResults();
+        case "overrideendpoint":
+        case "overrideEndpoint": return 
target.getConfiguration().isOverrideEndpoint();
+        case "pollstrategy":
+        case "pollStrategy": return target.getPollStrategy();
+        case "proxyhost":
+        case "proxyHost": return target.getConfiguration().getProxyHost();
+        case "proxyport":
+        case "proxyPort": return target.getConfiguration().getProxyPort();
+        case "proxyprotocol":
+        case "proxyProtocol": return 
target.getConfiguration().getProxyProtocol();
+        case "region": return target.getConfiguration().getRegion();
+        case "repeatcount":
+        case "repeatCount": return target.getRepeatCount();
+        case "runlogginglevel":
+        case "runLoggingLevel": return target.getRunLoggingLevel();
+        case "scheduledexecutorservice":
+        case "scheduledExecutorService": return 
target.getScheduledExecutorService();
+        case "scheduler": return target.getScheduler();
+        case "schedulerproperties":
+        case "schedulerProperties": return target.getSchedulerProperties();
+        case "secretkey":
+        case "secretKey": return target.getConfiguration().getSecretKey();
+        case "sendemptymessagewhenidle":
+        case "sendEmptyMessageWhenIdle": return 
target.isSendEmptyMessageWhenIdle();
+        case "startscheduler":
+        case "startScheduler": return target.isStartScheduler();
+        case "timeunit":
+        case "timeUnit": return target.getTimeUnit();
+        case "trustallcertificates":
+        case "trustAllCertificates": return 
target.getConfiguration().isTrustAllCertificates();
+        case "uriendpointoverride":
+        case "uriEndpointOverride": return 
target.getConfiguration().getUriEndpointOverride();
+        case "usedefaultcredentialsprovider":
+        case "useDefaultCredentialsProvider": return 
target.getConfiguration().isUseDefaultCredentialsProvider();
+        case "usefixeddelay":
+        case "useFixedDelay": return target.isUseFixedDelay();
+        default: return null;
+        }
+    }
+
+    @Override
+    public Object getCollectionValueType(Object target, String name, boolean 
ignoreCase) {
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "schedulerproperties":
+        case "schedulerProperties": return java.lang.Object.class;
+        default: return null;
+        }
+    }
+}
+
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/generated/java/org/apache/camel/component/aws/cloudtrail/CloudtrailEndpointUriFactory.java
 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/java/org/apache/camel/component/aws/cloudtrail/CloudtrailEndpointUriFactory.java
new file mode 100644
index 00000000000..3f85f9808a4
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/java/org/apache/camel/component/aws/cloudtrail/CloudtrailEndpointUriFactory.java
@@ -0,0 +1,106 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.aws.cloudtrail;
+
+import java.net.URISyntaxException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.camel.spi.EndpointUriFactory;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+public class CloudtrailEndpointUriFactory extends 
org.apache.camel.support.component.EndpointUriFactorySupport implements 
EndpointUriFactory {
+
+    private static final String BASE = ":label";
+
+    private static final Set<String> PROPERTY_NAMES;
+    private static final Set<String> SECRET_PROPERTY_NAMES;
+    private static final Set<String> MULTI_VALUE_PREFIXES;
+    static {
+        Set<String> props = new HashSet<>(34);
+        props.add("accessKey");
+        props.add("backoffErrorThreshold");
+        props.add("backoffIdleThreshold");
+        props.add("backoffMultiplier");
+        props.add("bridgeErrorHandler");
+        props.add("cloudTrailClient");
+        props.add("delay");
+        props.add("eventSource");
+        props.add("exceptionHandler");
+        props.add("exchangePattern");
+        props.add("greedy");
+        props.add("initialDelay");
+        props.add("label");
+        props.add("lazyStartProducer");
+        props.add("maxResults");
+        props.add("overrideEndpoint");
+        props.add("pollStrategy");
+        props.add("proxyHost");
+        props.add("proxyPort");
+        props.add("proxyProtocol");
+        props.add("region");
+        props.add("repeatCount");
+        props.add("runLoggingLevel");
+        props.add("scheduledExecutorService");
+        props.add("scheduler");
+        props.add("schedulerProperties");
+        props.add("secretKey");
+        props.add("sendEmptyMessageWhenIdle");
+        props.add("startScheduler");
+        props.add("timeUnit");
+        props.add("trustAllCertificates");
+        props.add("uriEndpointOverride");
+        props.add("useDefaultCredentialsProvider");
+        props.add("useFixedDelay");
+        PROPERTY_NAMES = Collections.unmodifiableSet(props);
+        Set<String> secretProps = new HashSet<>(2);
+        secretProps.add("accessKey");
+        secretProps.add("secretKey");
+        SECRET_PROPERTY_NAMES = Collections.unmodifiableSet(secretProps);
+        Set<String> prefixes = new HashSet<>(1);
+        prefixes.add("scheduler.");
+        MULTI_VALUE_PREFIXES = Collections.unmodifiableSet(prefixes);
+    }
+
+    @Override
+    public boolean isEnabled(String scheme) {
+        return "aws-cloudtrail".equals(scheme);
+    }
+
+    @Override
+    public String buildUri(String scheme, Map<String, Object> properties, 
boolean encode) throws URISyntaxException {
+        String syntax = scheme + BASE;
+        String uri = syntax;
+
+        Map<String, Object> copy = new HashMap<>(properties);
+
+        uri = buildPathParameter(syntax, uri, "label", null, true, copy);
+        uri = buildQueryParameters(uri, copy, encode);
+        return uri;
+    }
+
+    @Override
+    public Set<String> propertyNames() {
+        return PROPERTY_NAMES;
+    }
+
+    @Override
+    public Set<String> secretPropertyNames() {
+        return SECRET_PROPERTY_NAMES;
+    }
+
+    @Override
+    public Set<String> multiValuePrefixes() {
+        return MULTI_VALUE_PREFIXES;
+    }
+
+    @Override
+    public boolean isLenientProperties() {
+        return false;
+    }
+}
+
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/META-INF/services/org/apache/camel/component.properties
 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/META-INF/services/org/apache/camel/component.properties
new file mode 100644
index 00000000000..5781782da4e
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/META-INF/services/org/apache/camel/component.properties
@@ -0,0 +1,7 @@
+# Generated by camel build tools - do NOT edit this file!
+components=aws-cloudtrail aws-kinesis
+groupId=org.apache.camel
+artifactId=camel-aws-cloudtrail
+version=3.19.0-SNAPSHOT
+projectName=Camel :: AWS Cloutrail
+projectDescription=A Camel Amazon Cloudtrail Web Service Component Version 2
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/META-INF/services/org/apache/camel/component/aws-cloudtrail
 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/META-INF/services/org/apache/camel/component/aws-cloudtrail
new file mode 100644
index 00000000000..fcc22c529ca
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/META-INF/services/org/apache/camel/component/aws-cloudtrail
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws.cloudtrail.CloudtrailComponent
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/META-INF/services/org/apache/camel/component/aws-kinesis
 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/META-INF/services/org/apache/camel/component/aws-kinesis
new file mode 100644
index 00000000000..fcc22c529ca
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/META-INF/services/org/apache/camel/component/aws-kinesis
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws.cloudtrail.CloudtrailComponent
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws-cloudtrail-component
 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws-cloudtrail-component
new file mode 100644
index 00000000000..88f9a819d8a
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws-cloudtrail-component
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws.cloudtrail.CloudtrailComponentConfigurer
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws-cloudtrail-endpoint
 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws-cloudtrail-endpoint
new file mode 100644
index 00000000000..e5f391c0f64
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws-cloudtrail-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws.cloudtrail.CloudtrailEndpointConfigurer
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/META-INF/services/org/apache/camel/urifactory/aws-cloudtrail-endpoint
 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/META-INF/services/org/apache/camel/urifactory/aws-cloudtrail-endpoint
new file mode 100644
index 00000000000..657ceab3267
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/META-INF/services/org/apache/camel/urifactory/aws-cloudtrail-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws.cloudtrail.CloudtrailEndpointUriFactory
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/org/apache/camel/component/aws/cloudtrail/aws-cloudtrail.json
 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/org/apache/camel/component/aws/cloudtrail/aws-cloudtrail.json
new file mode 100644
index 00000000000..971f8598338
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/generated/resources/org/apache/camel/component/aws/cloudtrail/aws-cloudtrail.json
@@ -0,0 +1,79 @@
+{
+  "component": {
+    "kind": "component",
+    "name": "aws-cloudtrail",
+    "title": "AWS Cloudtrail",
+    "description": "Consume events from Amazon Cloudtrail using AWS SDK 
version 2.x.",
+    "deprecated": false,
+    "firstVersion": "3.19.0",
+    "label": "cloud,eventbus",
+    "javaType": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailComponent",
+    "supportLevel": "Preview",
+    "groupId": "org.apache.camel",
+    "artifactId": "camel-aws-cloudtrail",
+    "version": "3.19.0-SNAPSHOT",
+    "scheme": "aws-cloudtrail",
+    "extendsScheme": "",
+    "syntax": "aws-cloudtrail:label",
+    "async": false,
+    "api": false,
+    "consumerOnly": false,
+    "producerOnly": false,
+    "lenientProperties": false
+  },
+  "componentProperties": {
+    "cloudTrailClient": { "kind": "property", "displayName": "Cloud Trail 
Client", "group": "common", "label": "", "required": false, "type": "object", 
"javaType": "software.amazon.awssdk.services.cloudtrail.CloudTrailClient", 
"deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "Amazon Cloudtrail client 
to use for all [...]
+    "configuration": { "kind": "property", "displayName": "Configuration", 
"group": "common", "label": "", "required": false, "type": "object", 
"javaType": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"deprecated": false, "autowired": false, "secret": false, "description": 
"Component configuration" },
+    "eventSource": { "kind": "property", "displayName": "Event Source", 
"group": "common", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "Specify an event source 
to select events" },
+    "maxResults": { "kind": "property", "displayName": "Max Results", "group": 
"common", "label": "", "required": false, "type": "integer", "javaType": "int", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 1, 
"configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "Maximum number of 
records that will be fetched in each poll" },
+    "overrideEndpoint": { "kind": "property", "displayName": "Override 
Endpoint", "group": "common", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "Set the need for 
overidding the endpoint. This option needs to be used in combination with [...]
+    "proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": 
"common", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "To define a proxy host 
when instantiating the Cloudtrail client" },
+    "proxyPort": { "kind": "property", "displayName": "Proxy Port", "group": 
"common", "label": "", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "To define a proxy port 
when instantiating the Cloudtrail client" },
+    "proxyProtocol": { "kind": "property", "displayName": "Proxy Protocol", 
"group": "common", "label": "", "required": false, "type": "object", 
"javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" 
], "deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"HTTPS", "configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "To define a proxy 
protocol when insta [...]
+    "region": { "kind": "property", "displayName": "Region", "group": 
"common", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "The region in which 
Cloudtrail client needs to work. When using this parameter, the configuration 
will expect the lowercase na [...]
+    "trustAllCertificates": { "kind": "property", "displayName": "Trust All 
Certificates", "group": "common", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "If we want to trust all 
certificates in case of overriding the endpoint" },
+    "uriEndpointOverride": { "kind": "property", "displayName": "Uri Endpoint 
Override", "group": "common", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "Set the overriding uri 
endpoint. This option needs to be used in combination with overrideEndpoint 
[...]
+    "useDefaultCredentialsProvider": { "kind": "property", "displayName": "Use 
Default Credentials Provider", "group": "common", "label": "", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "Set whether the 
Cloudtrail client should expect to load creden [...]
+    "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error 
Handler", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "Allows for bridging the 
consumer to the Camel routing Error Handler, which mean any exceptions occurred 
while the consumer is trying to pickup incoming messages, or the likes, will 
now be processed as a me [...]
+    "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start 
Producer", "group": "producer", "label": "producer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "Whether the producer 
should be started lazy (on the first message). By starting lazy you can use 
this to allow CamelContext and routes to startup in situations where a producer 
may otherwise fail during star [...]
+    "autowiredEnabled": { "kind": "property", "displayName": "Autowired 
Enabled", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": true, "description": "Whether autowiring is 
enabled. This is used for automatic autowiring options (the option must be 
marked as autowired) by looking up in the registry to find if there is a single 
instance of matching type, which t [...]
+    "accessKey": { "kind": "property", "displayName": "Access Key", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "Amazon AWS Access Key" },
+    "secretKey": { "kind": "property", "displayName": "Secret Key", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+  },
+  "properties": {
+    "label": { "kind": "path", "displayName": "Label", "group": "common", 
"label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "A label for indexing 
cloudtrail endpoints" },
+    "cloudTrailClient": { "kind": "parameter", "displayName": "Cloud Trail 
Client", "group": "common", "label": "", "required": false, "type": "object", 
"javaType": "software.amazon.awssdk.services.cloudtrail.CloudTrailClient", 
"deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "Amazon Cloudtrail client 
to use for al [...]
+    "eventSource": { "kind": "parameter", "displayName": "Event Source", 
"group": "common", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "Specify an event source 
to select events" },
+    "maxResults": { "kind": "parameter", "displayName": "Max Results", 
"group": "common", "label": "", "required": false, "type": "integer", 
"javaType": "int", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": 1, "configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "Maximum number of 
records that will be fetched in each poll" },
+    "overrideEndpoint": { "kind": "parameter", "displayName": "Override 
Endpoint", "group": "common", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "Set the need for 
overidding the endpoint. This option needs to be used in combination wit [...]
+    "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": 
"common", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "To define a proxy host 
when instantiating the Cloudtrail client" },
+    "proxyPort": { "kind": "parameter", "displayName": "Proxy Port", "group": 
"common", "label": "", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "To define a proxy port 
when instantiating the Cloudtrail client" },
+    "proxyProtocol": { "kind": "parameter", "displayName": "Proxy Protocol", 
"group": "common", "label": "", "required": false, "type": "object", 
"javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" 
], "deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"HTTPS", "configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "To define a proxy 
protocol when inst [...]
+    "region": { "kind": "parameter", "displayName": "Region", "group": 
"common", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "The region in which 
Cloudtrail client needs to work. When using this parameter, the configuration 
will expect the lowercase n [...]
+    "trustAllCertificates": { "kind": "parameter", "displayName": "Trust All 
Certificates", "group": "common", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "If we want to trust all 
certificates in case of overriding the endpoint" },
+    "uriEndpointOverride": { "kind": "parameter", "displayName": "Uri Endpoint 
Override", "group": "common", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "Set the overriding uri 
endpoint. This option needs to be used in combination with overrideEndpoin [...]
+    "useDefaultCredentialsProvider": { "kind": "parameter", "displayName": 
"Use Default Credentials Provider", "group": "common", "label": "", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "Set whether the 
Cloudtrail client should expect to load crede [...]
+    "sendEmptyMessageWhenIdle": { "kind": "parameter", "displayName": "Send 
Empty Message When Idle", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": "If 
the polling consumer did not poll any files, you can enable this option to send 
an empty message (no body) instead." },
+    "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error 
Handler", "group": "consumer (advanced)", "label": "consumer,advanced", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": false, 
"description": "Allows for bridging the consumer to the Camel routing Error 
Handler, which mean any exceptions occurred while the consumer is trying to 
pickup incoming messages, or the likes, will now [...]
+    "exceptionHandler": { "kind": "parameter", "displayName": "Exception 
Handler", "group": "consumer (advanced)", "label": "consumer,advanced", 
"required": false, "type": "object", "javaType": 
"org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", 
"deprecated": false, "autowired": false, "secret": false, "description": "To 
let the consumer use a custom ExceptionHandler. Notice if the option 
bridgeErrorHandler is enabled then this option is not in use. By default the 
con [...]
+    "exchangePattern": { "kind": "parameter", "displayName": "Exchange 
Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", 
"required": false, "type": "object", "javaType": 
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut", 
"InOptionalOut" ], "deprecated": false, "autowired": false, "secret": false, 
"description": "Sets the exchange pattern when the consumer creates an 
exchange." },
+    "pollStrategy": { "kind": "parameter", "displayName": "Poll Strategy", 
"group": "consumer (advanced)", "label": "consumer,advanced", "required": 
false, "type": "object", "javaType": 
"org.apache.camel.spi.PollingConsumerPollStrategy", "deprecated": false, 
"autowired": false, "secret": false, "description": "A pluggable 
org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your 
custom implementation to control error handling usually occurred during the 
poll operation  [...]
+    "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start 
Producer", "group": "producer (advanced)", "label": "producer,advanced", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": false, 
"description": "Whether the producer should be started lazy (on the first 
message). By starting lazy you can use this to allow CamelContext and routes to 
startup in situations where a producer may other [...]
+    "backoffErrorThreshold": { "kind": "parameter", "displayName": "Backoff 
Error Threshold", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "int", "deprecated": false, 
"autowired": false, "secret": false, "description": "The number of subsequent 
error polls (failed due some error) that should happen before the 
backoffMultipler should kick-in." },
+    "backoffIdleThreshold": { "kind": "parameter", "displayName": "Backoff 
Idle Threshold", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "int", "deprecated": false, 
"autowired": false, "secret": false, "description": "The number of subsequent 
idle polls that should happen before the backoffMultipler should kick-in." },
+    "backoffMultiplier": { "kind": "parameter", "displayName": "Backoff 
Multiplier", "group": "scheduler", "label": "consumer,scheduler", "required": 
false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": 
false, "secret": false, "description": "To let the scheduled polling consumer 
backoff if there has been a number of subsequent idles\/errors in a row. The 
multiplier is then the number of polls that will be skipped before the next 
actual attempt is happening agai [...]
+    "delay": { "kind": "parameter", "displayName": "Delay", "group": 
"scheduler", "label": "consumer,scheduler", "required": false, "type": 
"integer", "javaType": "long", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 500, "description": "Milliseconds before the 
next poll." },
+    "greedy": { "kind": "parameter", "displayName": "Greedy", "group": 
"scheduler", "label": "consumer,scheduler", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "If greedy is enabled, 
then the ScheduledPollConsumer will run immediately again, if the previous run 
polled 1 or more messages." },
+    "initialDelay": { "kind": "parameter", "displayName": "Initial Delay", 
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type": 
"integer", "javaType": "long", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 1000, "description": "Milliseconds before the 
first poll starts." },
+    "repeatCount": { "kind": "parameter", "displayName": "Repeat Count", 
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type": 
"integer", "javaType": "long", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 0, "description": "Specifies a maximum limit 
of number of fires. So if you set it to 1, the scheduler will only fire once. 
If you set it to 5, it will only fire five times. A value of zero or negative 
means fire forever." },
+    "runLoggingLevel": { "kind": "parameter", "displayName": "Run Logging 
Level", "group": "scheduler", "label": "consumer,scheduler", "required": false, 
"type": "object", "javaType": "org.apache.camel.LoggingLevel", "enum": [ 
"TRACE", "DEBUG", "INFO", "WARN", "ERROR", "OFF" ], "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "TRACE", "description": 
"The consumer logs a start\/complete log line when it polls. This option allows 
you to configure the logging level  [...]
+    "scheduledExecutorService": { "kind": "parameter", "displayName": 
"Scheduled Executor Service", "group": "scheduler", "label": 
"consumer,scheduler", "required": false, "type": "object", "javaType": 
"java.util.concurrent.ScheduledExecutorService", "deprecated": false, 
"autowired": false, "secret": false, "description": "Allows for configuring a 
custom\/shared thread pool to use for the consumer. By default each consumer 
has its own single threaded thread pool." },
+    "scheduler": { "kind": "parameter", "displayName": "Scheduler", "group": 
"scheduler", "label": "consumer,scheduler", "required": false, "type": 
"object", "javaType": "java.lang.Object", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "none", "description": "To use a cron 
scheduler from either camel-spring or camel-quartz component. Use value spring 
or quartz for built in scheduler" },
+    "schedulerProperties": { "kind": "parameter", "displayName": "Scheduler 
Properties", "group": "scheduler", "label": "consumer,scheduler", "required": 
false, "type": "object", "javaType": "java.util.Map<java.lang.String, 
java.lang.Object>", "prefix": "scheduler.", "multiValue": true, "deprecated": 
false, "autowired": false, "secret": false, "description": "To configure 
additional properties when using a custom scheduler or any of the Quartz, 
Spring based scheduler." },
+    "startScheduler": { "kind": "parameter", "displayName": "Start Scheduler", 
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": true, "description": "Whether the scheduler 
should be auto started." },
+    "timeUnit": { "kind": "parameter", "displayName": "Time Unit", "group": 
"scheduler", "label": "consumer,scheduler", "required": false, "type": 
"object", "javaType": "java.util.concurrent.TimeUnit", "enum": [ "NANOSECONDS", 
"MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ], 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"MILLISECONDS", "description": "Time unit for initialDelay and delay options." 
},
+    "useFixedDelay": { "kind": "parameter", "displayName": "Use Fixed Delay", 
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": true, "description": "Controls if fixed delay 
or fixed rate is used. See ScheduledExecutorService in JDK for details." },
+    "accessKey": { "kind": "parameter", "displayName": "Access Key", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "Amazon AWS Access Key" },
+    "secretKey": { "kind": "parameter", "displayName": "Secret Key", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration", 
"configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+  }
+}
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/main/docs/aws-cloudtrail-component.adoc
 
b/components/camel-aws/camel-aws-cloudtrail/src/main/docs/aws-cloudtrail-component.adoc
new file mode 100644
index 00000000000..58775e7b17b
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/main/docs/aws-cloudtrail-component.adoc
@@ -0,0 +1,49 @@
+= AWS Cloudtrail Component
+:doctitle: AWS Cloudtrail
+:shortname: aws-cloudtrail
+:artifactid: camel-aws-cloudtrail
+:description: Consume events from Amazon Cloudtrail using AWS SDK version 2.x.
+:since: 3.19
+:supportlevel: Preview
+:component-header: Both producer and consumer are supported
+//Manually maintained attributes
+:group: AWS
+:camel-spring-boot-name: aws-cloudtrail
+
+*Since Camel {since}*
+
+*{component-header}*
+
+The AWS Cloudtrail component supports receiving events from Amazon Cloudtrail
+service.
+
+Prerequisites
+
+You must have a valid Amazon Web Services developer account, and be
+signed up to use Amazon Cloudtrail. More information are available
+at https://aws.amazon.com/cloudtrail/[AWS Cloudtrail]
+
+
+== URI Format
+
+-----------------------------------
+aws-cloudtrail://label[?options]
+-----------------------------------
+
+The stream needs to be created prior to it being used. +
+ You can append query options to the URI in the following format,
+?options=value&option2=value&...
+
+
+// component-configure options: START
+
+// component-configure options: END
+
+// component options: START
+include::partial$component-configure-options.adoc[]
+include::partial$component-endpoint-options.adoc[]
+// component options: END
+
+// endpoint options: START
+
+// endpoint options: END
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/CloudtrailComponent.java
 
b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/CloudtrailComponent.java
new file mode 100644
index 00000000000..9fe6939f739
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/CloudtrailComponent.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.cloudtrail;
+
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Endpoint;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.annotations.Component;
+import org.apache.camel.support.DefaultComponent;
+
+@Component("aws-cloudtrail")
+public class CloudtrailComponent extends DefaultComponent {
+
+    @Metadata
+    private CloudtrailConfiguration configuration = new 
CloudtrailConfiguration();
+
+    public CloudtrailComponent() {
+        this(null);
+    }
+
+    public CloudtrailComponent(CamelContext context) {
+        super(context);
+    }
+
+    @Override
+    protected Endpoint createEndpoint(String uri, String remaining, 
Map<String, Object> parameters) throws Exception {
+        CloudtrailConfiguration configuration
+                = this.configuration != null ? this.configuration.copy() : new 
CloudtrailConfiguration();
+        configuration.setLabel(remaining);
+        CloudtrailEndpoint endpoint = new CloudtrailEndpoint(uri, 
configuration, this);
+        setProperties(endpoint, parameters);
+        if (!configuration.isUseDefaultCredentialsProvider() && 
configuration.getCloudTrailClient() == null
+                && (configuration.getAccessKey() == null || 
configuration.getSecretKey() == null)) {
+            throw new IllegalArgumentException(
+                    "useDefaultCredentialsProvider is set to false, 
cloudTrailClient or accessKey and secretKey must be specified");
+        }
+        return endpoint;
+    }
+
+    public CloudtrailConfiguration getConfiguration() {
+        return configuration;
+    }
+
+    /**
+     * Component configuration
+     */
+    public void setConfiguration(CloudtrailConfiguration configuration) {
+        this.configuration = configuration;
+    }
+}
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/CloudtrailConfiguration.java
 
b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/CloudtrailConfiguration.java
new file mode 100644
index 00000000000..81411390851
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/CloudtrailConfiguration.java
@@ -0,0 +1,192 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.cloudtrail;
+
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+import org.apache.camel.spi.UriPath;
+import software.amazon.awssdk.core.Protocol;
+import software.amazon.awssdk.services.cloudtrail.CloudTrailClient;
+
+@UriParams
+public class CloudtrailConfiguration implements Cloneable {
+
+    @UriPath(description = "A label for indexing cloudtrail endpoints")
+    @Metadata(required = true)
+    private String label;
+    @UriParam(label = "security", secret = true, description = "Amazon AWS 
Access Key")
+    private String accessKey;
+    @UriParam(label = "security", secret = true, description = "Amazon AWS 
Secret Key")
+    private String secretKey;
+    @UriParam(description = "The region in which Cloudtrail client needs to 
work. When using this parameter, the configuration will expect the lowercase 
name of the "
+                            + "region (for example ap-east-1) You'll need to 
use the name Region.EU_WEST_1.id()")
+    private String region;
+    @UriParam(description = "Amazon Cloudtrail client to use for all requests 
for this endpoint")
+    @Metadata(autowired = true)
+    private CloudTrailClient cloudTrailClient;
+    @UriParam(description = "Maximum number of records that will be fetched in 
each poll",
+              defaultValue = "1")
+    private int maxResults = 1;
+    @UriParam(description = "Specify an event source to select events")
+    private String eventSource;
+    @UriParam(enums = "HTTP,HTTPS", defaultValue = "HTTPS",
+              description = "To define a proxy protocol when instantiating the 
Cloudtrail client")
+    private Protocol proxyProtocol = Protocol.HTTPS;
+    @UriParam(description = "To define a proxy host when instantiating the 
Cloudtrail client")
+    private String proxyHost;
+    @UriParam(description = "To define a proxy port when instantiating the 
Cloudtrail client")
+    private Integer proxyPort;
+    @UriParam(defaultValue = "false", description = "If we want to trust all 
certificates in case of overriding the endpoint")
+    private boolean trustAllCertificates;
+    @UriParam(defaultValue = "false",
+              description = "Set the need for overidding the endpoint. This 
option needs to be used in combination with uriEndpointOverride"
+                            + " option")
+    private boolean overrideEndpoint;
+    @UriParam(
+              description = "Set the overriding uri endpoint. This option 
needs to be used in combination with overrideEndpoint option")
+    private String uriEndpointOverride;
+    @UriParam(defaultValue = "false",
+              description = "Set whether the Cloudtrail client should expect 
to load credentials through a default credentials provider or to expect "
+                            +
+                            "static credentials to be passed in.")
+    private boolean useDefaultCredentialsProvider;
+
+    public String getLabel() {
+        return label;
+    }
+
+    public void setLabel(String label) {
+        this.label = label;
+    }
+
+    public CloudTrailClient getCloudTrailClient() {
+        return cloudTrailClient;
+    }
+
+    public void setCloudTrailClient(CloudTrailClient cloudTrailClient) {
+        this.cloudTrailClient = cloudTrailClient;
+    }
+
+    public int getMaxResults() {
+        return maxResults;
+    }
+
+    public void setMaxResults(int maxResults) {
+        this.maxResults = maxResults;
+    }
+
+    public String getAccessKey() {
+        return accessKey;
+    }
+
+    public void setAccessKey(String accessKey) {
+        this.accessKey = accessKey;
+    }
+
+    public String getSecretKey() {
+        return secretKey;
+    }
+
+    public void setSecretKey(String secretKey) {
+        this.secretKey = secretKey;
+    }
+
+    public String getRegion() {
+        return region;
+    }
+
+    public void setRegion(String region) {
+        this.region = region;
+    }
+
+    public Protocol getProxyProtocol() {
+        return proxyProtocol;
+    }
+
+    public void setProxyProtocol(Protocol proxyProtocol) {
+        this.proxyProtocol = proxyProtocol;
+    }
+
+    public String getProxyHost() {
+        return proxyHost;
+    }
+
+    public void setProxyHost(String proxyHost) {
+        this.proxyHost = proxyHost;
+    }
+
+    public Integer getProxyPort() {
+        return proxyPort;
+    }
+
+    public void setProxyPort(Integer proxyPort) {
+        this.proxyPort = proxyPort;
+    }
+
+    public boolean isTrustAllCertificates() {
+        return trustAllCertificates;
+    }
+
+    public void setTrustAllCertificates(boolean trustAllCertificates) {
+        this.trustAllCertificates = trustAllCertificates;
+    }
+
+    public boolean isOverrideEndpoint() {
+        return overrideEndpoint;
+    }
+
+    public void setOverrideEndpoint(boolean overrideEndpoint) {
+        this.overrideEndpoint = overrideEndpoint;
+    }
+
+    public String getUriEndpointOverride() {
+        return uriEndpointOverride;
+    }
+
+    public void setUriEndpointOverride(String uriEndpointOverride) {
+        this.uriEndpointOverride = uriEndpointOverride;
+    }
+
+    public boolean isUseDefaultCredentialsProvider() {
+        return useDefaultCredentialsProvider;
+    }
+
+    public void setUseDefaultCredentialsProvider(boolean 
useDefaultCredentialsProvider) {
+        this.useDefaultCredentialsProvider = useDefaultCredentialsProvider;
+    }
+
+    public String getEventSource() {
+        return eventSource;
+    }
+
+    public void setEventSource(String eventSource) {
+        this.eventSource = eventSource;
+    }
+
+    // *************************************************
+    //
+    // *************************************************
+    public CloudtrailConfiguration copy() {
+        try {
+            return (CloudtrailConfiguration) super.clone();
+        } catch (CloneNotSupportedException e) {
+            throw new RuntimeCamelException(e);
+        }
+    }
+}
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/CloudtrailConstants.java
 
b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/CloudtrailConstants.java
new file mode 100644
index 00000000000..3578d1ff1e0
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/CloudtrailConstants.java
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.cloudtrail;
+
+public interface CloudtrailConstants {
+}
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/CloudtrailConsumer.java
 
b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/CloudtrailConsumer.java
new file mode 100644
index 00000000000..da09c38d390
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/CloudtrailConsumer.java
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.cloudtrail;
+
+import java.nio.charset.StandardCharsets;
+import java.time.Instant;
+import java.util.*;
+
+import org.apache.camel.AsyncCallback;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.support.ScheduledBatchPollingConsumer;
+import org.apache.camel.util.CastUtils;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import software.amazon.awssdk.services.cloudtrail.CloudTrailClient;
+import software.amazon.awssdk.services.cloudtrail.model.*;
+
+public class CloudtrailConsumer extends ScheduledBatchPollingConsumer {
+
+    private static final Logger LOG = 
LoggerFactory.getLogger(CloudtrailConsumer.class);
+    private static Instant lastTime = null;
+
+    public CloudtrailConsumer(CloudtrailEndpoint endpoint, Processor 
processor) {
+        super(endpoint, processor);
+    }
+
+    @Override
+    protected int poll() throws Exception {
+        LookupEventsRequest.Builder eventsRequestBuilder = 
LookupEventsRequest.builder().maxResults(getEndpoint().getConfiguration().getMaxResults());
+
+        List<LookupAttribute> attributes = new ArrayList<LookupAttribute>();
+        if 
(ObjectHelper.isNotEmpty(getEndpoint().getConfiguration().getEventSource())) {
+            LookupAttribute eventSource = 
LookupAttribute.builder().attributeKey(LookupAttributeKey.EVENT_SOURCE).attributeValue(getEndpoint().getConfiguration().getEventSource()).build();
+            attributes.add(eventSource);
+        }
+        if (!attributes.isEmpty()) {
+            eventsRequestBuilder.lookupAttributes(attributes);
+        }
+        if (lastTime != null) {
+            eventsRequestBuilder.startTime(lastTime.plusMillis(1000));
+        }
+
+        LookupEventsResponse response = 
getClient().lookupEvents(eventsRequestBuilder.build());
+
+        if (response.events().size() > 0) {
+            lastTime = response.events().get(0).eventTime();
+        }
+
+        Queue<Exchange> exchanges = createExchanges(response.events());
+        int processedExchangeCount = processBatch(CastUtils.cast(exchanges));
+
+        return processedExchangeCount;
+    }
+
+    @Override
+    public int processBatch(Queue<Object> exchanges) throws Exception {
+        int processedExchanges = 0;
+        while (!exchanges.isEmpty()) {
+            final Exchange exchange = ObjectHelper.cast(Exchange.class, 
exchanges.poll());
+
+            // use default consumer callback
+            AsyncCallback cb = defaultConsumerCallback(exchange, true);
+            getAsyncProcessor().process(exchange, cb);
+            processedExchanges++;
+        }
+        return processedExchanges;
+    }
+
+    private CloudTrailClient getClient() {
+        return getEndpoint().getClient();
+    }
+
+    @Override
+    public CloudtrailEndpoint getEndpoint() {
+        return (CloudtrailEndpoint) super.getEndpoint();
+    }
+
+    private Queue<Exchange> createExchanges(List<Event> events) {
+        Queue<Exchange> exchanges = new ArrayDeque<>();
+        for (Event event : events) {
+            exchanges.add(createExchange(event));
+        }
+        return exchanges;
+    }
+
+    protected Exchange createExchange(Event event) {
+        Exchange exchange = createExchange(true);
+        
exchange.getIn().setBody(event.cloudTrailEvent().getBytes(StandardCharsets.UTF_8));
+        return exchange;
+    }
+}
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/CloudtrailEndpoint.java
 
b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/CloudtrailEndpoint.java
new file mode 100644
index 00000000000..5057459ceda
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/CloudtrailEndpoint.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.cloudtrail;
+
+import org.apache.camel.Category;
+import org.apache.camel.Consumer;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
+import 
org.apache.camel.component.aws.cloudtrail.client.CloudtrailClientFactory;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.support.ScheduledPollEndpoint;
+import org.apache.camel.util.ObjectHelper;
+import software.amazon.awssdk.services.cloudtrail.CloudTrailClient;
+
+/**
+ * Consume events from Amazon Cloudtrail using AWS SDK version 2.x.
+ */
+@UriEndpoint(firstVersion = "3.19.0", scheme = "aws-cloudtrail", title = "AWS 
Cloudtrail", syntax = "aws-cloudtrail:label",
+             category = { Category.CLOUD, Category.EVENTBUS }, headersClass = 
CloudtrailConstants.class)
+public class CloudtrailEndpoint extends ScheduledPollEndpoint {
+
+    @UriParam
+    private CloudtrailConfiguration configuration;
+
+    private CloudTrailClient cloudTrailClient;
+
+    public CloudtrailEndpoint(String uri, CloudtrailConfiguration 
configuration, CloudtrailComponent component) {
+        super(uri, component);
+        this.configuration = configuration;
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        super.doStart();
+        cloudTrailClient = configuration.getCloudTrailClient() != null
+                ? configuration.getCloudTrailClient()
+                : 
CloudtrailClientFactory.getCloudtrailClient(configuration).getCloudtrailClient();
+        }
+
+    @Override
+    public void doStop() throws Exception {
+        if (ObjectHelper.isEmpty(configuration.getCloudTrailClient())) {
+            if (cloudTrailClient != null) {
+                cloudTrailClient.close();
+            }
+        }
+        super.doStop();
+    }
+
+    @Override
+    public Producer createProducer() throws Exception {
+        throw new UnsupportedOperationException("You cannot produce messages 
to this endpoint");
+    }
+
+    @Override
+    public Consumer createConsumer(Processor processor) throws Exception {
+        final CloudtrailConsumer consumer = new CloudtrailConsumer(this, 
processor);
+        consumer.setSchedulerProperties(getSchedulerProperties());
+        configureConsumer(consumer);
+        return consumer;
+    }
+
+    public CloudTrailClient getClient() {
+        return cloudTrailClient;
+    }
+
+    public CloudtrailConfiguration getConfiguration() {
+        return configuration;
+    }
+}
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/client/CloudtrailClientFactory.java
 
b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/client/CloudtrailClientFactory.java
new file mode 100644
index 00000000000..eba8ff0a23e
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/client/CloudtrailClientFactory.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.cloudtrail.client;
+
+import org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration;
+import 
org.apache.camel.component.aws.cloudtrail.client.impl.CloudtrailClientIAMOptimizedImpl;
+import 
org.apache.camel.component.aws.cloudtrail.client.impl.CloudtrailClientStandardImpl;
+
+/**
+ * Factory class to return the correct type of AWS Cloudtrail client.
+ */
+public final class CloudtrailClientFactory {
+
+    private CloudtrailClientFactory() {
+    }
+
+    /**
+     * Return the correct aws Cloudtrail client (based on remote vs local).
+     * 
+     * @param  configuration configuration
+     * @return               CloudTrailClient
+     */
+    public static CloudtrailInternalClient 
getCloudtrailClient(CloudtrailConfiguration configuration) {
+        return configuration.isUseDefaultCredentialsProvider()
+                ? new CloudtrailClientIAMOptimizedImpl(configuration) : new 
CloudtrailClientStandardImpl(configuration);
+    }
+}
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/client/CloudtrailInternalClient.java
 
b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/client/CloudtrailInternalClient.java
new file mode 100644
index 00000000000..c206fdf0616
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/client/CloudtrailInternalClient.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.cloudtrail.client;
+
+
+import software.amazon.awssdk.services.cloudtrail.CloudTrailClient;
+
+/**
+ * Manage the required actions of a CloudTrail client for either local or 
remote.
+ */
+public interface CloudtrailInternalClient {
+
+    /**
+     * Returns a Cloudtrail client after a factory method determines which one 
to return.
+     *
+     * @return CloudTrail client
+     */
+    CloudTrailClient getCloudtrailClient();
+}
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/client/impl/CloudtrailClientIAMOptimizedImpl.java
 
b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/client/impl/CloudtrailClientIAMOptimizedImpl.java
new file mode 100644
index 00000000000..e04ec39abbc
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/client/impl/CloudtrailClientIAMOptimizedImpl.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.cloudtrail.client.impl;
+
+import java.net.URI;
+
+import org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration;
+import 
org.apache.camel.component.aws.cloudtrail.client.CloudtrailInternalClient;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import software.amazon.awssdk.http.SdkHttpClient;
+import software.amazon.awssdk.http.SdkHttpConfigurationOption;
+import software.amazon.awssdk.http.apache.ApacheHttpClient;
+import software.amazon.awssdk.http.apache.ProxyConfiguration;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.cloudtrail.CloudTrailClient;
+import software.amazon.awssdk.services.cloudtrail.CloudTrailClientBuilder;
+import software.amazon.awssdk.utils.AttributeMap;
+
+/**
+ * Manage an AWS Cloudtrail client for all users to use (enabling temporary 
creds). This implementation is for remote
+ * instances to manage the credentials on their own (eliminating credential 
rotations)
+ */
+public class CloudtrailClientIAMOptimizedImpl implements 
CloudtrailInternalClient {
+    private static final Logger LOG = 
LoggerFactory.getLogger(CloudtrailClientIAMOptimizedImpl.class);
+    private CloudtrailConfiguration configuration;
+
+    /**
+     * Constructor that uses the config file.
+     */
+    public CloudtrailClientIAMOptimizedImpl(CloudtrailConfiguration 
configuration) {
+        LOG.trace("Creating an AWS Cloudtrail client for an ec2 instance with 
IAM temporary credentials (normal for ec2s).");
+        this.configuration = configuration;
+    }
+
+    /**
+     * Getting the Cloudtrail client that is used.
+     *
+     * @return Amazon Cloudtrail Client.
+     */
+    @Override
+    public CloudTrailClient getCloudtrailClient() {
+        CloudTrailClient client = null;
+        CloudTrailClientBuilder clientBuilder = CloudTrailClient.builder();
+        ProxyConfiguration.Builder proxyConfig = null;
+        ApacheHttpClient.Builder httpClientBuilder = null;
+
+        if (ObjectHelper.isNotEmpty(configuration.getProxyHost()) && 
ObjectHelper.isNotEmpty(configuration.getProxyPort())) {
+            proxyConfig = ProxyConfiguration.builder();
+            URI proxyEndpoint = URI.create(configuration.getProxyProtocol() + 
"://" + configuration.getProxyHost() + ":"
+                                           + configuration.getProxyPort());
+            proxyConfig.endpoint(proxyEndpoint);
+            httpClientBuilder = 
ApacheHttpClient.builder().proxyConfiguration(proxyConfig.build());
+            clientBuilder = clientBuilder.httpClientBuilder(httpClientBuilder);
+        }
+        if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+            clientBuilder = 
clientBuilder.region(Region.of(configuration.getRegion()));
+        }
+        if (configuration.isOverrideEndpoint()) {
+            
clientBuilder.endpointOverride(URI.create(configuration.getUriEndpointOverride()));
+        }
+        if (configuration.isTrustAllCertificates()) {
+            SdkHttpClient ahc = 
ApacheHttpClient.builder().buildWithDefaults(AttributeMap
+                    .builder()
+                    .put(
+                            SdkHttpConfigurationOption.TRUST_ALL_CERTIFICATES,
+                            Boolean.TRUE)
+                    .build());
+            clientBuilder.httpClient(ahc);
+        }
+        client = clientBuilder.build();
+        return client;
+    }
+}
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/client/impl/CloudtrailClientStandardImpl.java
 
b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/client/impl/CloudtrailClientStandardImpl.java
new file mode 100644
index 00000000000..8cb7814c932
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/main/java/org/apache/camel/component/aws/cloudtrail/client/impl/CloudtrailClientStandardImpl.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.cloudtrail.client.impl;
+
+import java.net.URI;
+
+import org.apache.camel.component.aws.cloudtrail.CloudtrailConfiguration;
+import 
org.apache.camel.component.aws.cloudtrail.client.CloudtrailInternalClient;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
+import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
+import software.amazon.awssdk.http.SdkHttpClient;
+import software.amazon.awssdk.http.SdkHttpConfigurationOption;
+import software.amazon.awssdk.http.apache.ApacheHttpClient;
+import software.amazon.awssdk.http.apache.ProxyConfiguration;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.cloudtrail.CloudTrailClient;
+import software.amazon.awssdk.services.cloudtrail.CloudTrailClientBuilder;
+import software.amazon.awssdk.utils.AttributeMap;
+
+/**
+ * Manage an AWS Cloudtrail client for all users to use. This implementation 
is for local instances to use a static and
+ * solid credential set.
+ */
+public class CloudtrailClientStandardImpl implements CloudtrailInternalClient {
+    private static final Logger LOG = 
LoggerFactory.getLogger(CloudtrailClientStandardImpl.class);
+    private CloudtrailConfiguration configuration;
+
+    /**
+     * Constructor that uses the config file.
+     */
+    public CloudtrailClientStandardImpl(CloudtrailConfiguration configuration) 
{
+        LOG.trace("Creating an AWS Cloudtrail manager using static 
credentials.");
+        this.configuration = configuration;
+    }
+
+    /**
+     * Getting the Cloudtrail client that is used.
+     * 
+     * @return Amazon Cloudtrail Client.
+     */
+    @Override
+    public CloudTrailClient getCloudtrailClient() {
+        CloudTrailClient client = null;
+        CloudTrailClientBuilder clientBuilder = CloudTrailClient.builder();
+        ProxyConfiguration.Builder proxyConfig = null;
+        ApacheHttpClient.Builder httpClientBuilder = null;
+        boolean isClientConfigFound = false;
+        if (ObjectHelper.isNotEmpty(configuration.getProxyHost()) && 
ObjectHelper.isNotEmpty(configuration.getProxyPort())) {
+            proxyConfig = ProxyConfiguration.builder();
+            URI proxyEndpoint = URI.create(configuration.getProxyProtocol() + 
"://" + configuration.getProxyHost() + ":"
+                                           + configuration.getProxyPort());
+            proxyConfig.endpoint(proxyEndpoint);
+            httpClientBuilder = 
ApacheHttpClient.builder().proxyConfiguration(proxyConfig.build());
+            isClientConfigFound = true;
+        }
+        if (configuration.getAccessKey() != null && 
configuration.getSecretKey() != null) {
+            AwsBasicCredentials cred = 
AwsBasicCredentials.create(configuration.getAccessKey(), 
configuration.getSecretKey());
+            if (isClientConfigFound) {
+                clientBuilder = 
clientBuilder.httpClientBuilder(httpClientBuilder)
+                        
.credentialsProvider(StaticCredentialsProvider.create(cred));
+            } else {
+                clientBuilder = 
clientBuilder.credentialsProvider(StaticCredentialsProvider.create(cred));
+            }
+        } else {
+            if (!isClientConfigFound) {
+                clientBuilder = 
clientBuilder.httpClientBuilder(httpClientBuilder);
+            }
+        }
+        if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+            clientBuilder = 
clientBuilder.region(Region.of(configuration.getRegion()));
+        }
+        if (configuration.isOverrideEndpoint()) {
+            
clientBuilder.endpointOverride(URI.create(configuration.getUriEndpointOverride()));
+        }
+        if (configuration.isTrustAllCertificates()) {
+            SdkHttpClient ahc = 
ApacheHttpClient.builder().buildWithDefaults(AttributeMap
+                    .builder()
+                    .put(
+                            SdkHttpConfigurationOption.TRUST_ALL_CERTIFICATES,
+                            Boolean.TRUE)
+                    .build());
+            clientBuilder.httpClient(ahc);
+        }
+        client = clientBuilder.build();
+        return client;
+    }
+}
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/test/java/org/apache/camel/component/aws/cloudtrail/CloudtrailClientFactoryTest.java
 
b/components/camel-aws/camel-aws-cloudtrail/src/test/java/org/apache/camel/component/aws/cloudtrail/CloudtrailClientFactoryTest.java
new file mode 100644
index 00000000000..027f929b770
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/test/java/org/apache/camel/component/aws/cloudtrail/CloudtrailClientFactoryTest.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.cloudtrail;
+
+import 
org.apache.camel.component.aws.cloudtrail.client.CloudtrailClientFactory;
+import 
org.apache.camel.component.aws.cloudtrail.client.CloudtrailInternalClient;
+import 
org.apache.camel.component.aws.cloudtrail.client.impl.CloudtrailClientIAMOptimizedImpl;
+import 
org.apache.camel.component.aws.cloudtrail.client.impl.CloudtrailClientStandardImpl;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class CloudtrailClientFactoryTest {
+
+    @Test
+    public void getStandardCloudtrailClientDefault() {
+        CloudtrailConfiguration cloudtrailConf = new CloudtrailConfiguration();
+        CloudtrailInternalClient cloudtrailClient = 
CloudtrailClientFactory.getCloudtrailClient(cloudtrailConf);
+        assertTrue(cloudtrailClient instanceof CloudtrailClientStandardImpl);
+    }
+
+    @Test
+    public void getStandardCloudtrailClient() {
+        CloudtrailConfiguration cloudtrailConf = new CloudtrailConfiguration();
+        cloudtrailConf.setUseDefaultCredentialsProvider(false);
+        CloudtrailInternalClient cloudtrailClient = 
CloudtrailClientFactory.getCloudtrailClient(cloudtrailConf);
+        assertTrue(cloudtrailClient instanceof CloudtrailClientStandardImpl);
+    }
+
+    @Test
+    public void getIAMOptimizedCloudtrailClient() {
+        CloudtrailConfiguration cloudtrailConf = new CloudtrailConfiguration();
+        cloudtrailConf.setUseDefaultCredentialsProvider(true);
+        CloudtrailInternalClient cloudtrailClient = 
CloudtrailClientFactory.getCloudtrailClient(cloudtrailConf);
+        assertTrue(cloudtrailClient instanceof 
CloudtrailClientIAMOptimizedImpl);
+    }
+}
diff --git 
a/components/camel-aws/camel-aws-cloudtrail/src/test/resources/log4j2.properties
 
b/components/camel-aws/camel-aws-cloudtrail/src/test/resources/log4j2.properties
new file mode 100644
index 00000000000..6e2aa10277e
--- /dev/null
+++ 
b/components/camel-aws/camel-aws-cloudtrail/src/test/resources/log4j2.properties
@@ -0,0 +1,28 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+appender.file.type = File
+appender.file.name = file
+appender.file.fileName = target/camel-aws2-kinesis-test.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+appender.out.type = Console
+appender.out.name = out
+appender.out.layout.type = PatternLayout
+appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+rootLogger.level = INFO
+rootLogger.appenderRef.file.ref = file
diff --git a/parent/pom.xml b/parent/pom.xml
index 295ba60fc93..4bdae8d819f 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -841,6 +841,11 @@
                                <artifactId>camel-avro</artifactId>
                                <version>${project.version}</version>
                        </dependency>
+                       <dependency>
+                               <groupId>org.apache.camel</groupId>
+                               <artifactId>camel-aws-cloudtrail</artifactId>
+                               <version>${project.version}</version>
+                       </dependency>
                        <dependency>
                                <groupId>org.apache.camel</groupId>
                                <artifactId>camel-aws-parent</artifactId>

Reply via email to