You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/10/30 17:51:10 UTC
[camel] branch master updated: CAMEL-15779 - use
DefaultCredentialsProvider for IAMOptimized S3 client
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 66b31fa CAMEL-15779 - use DefaultCredentialsProvider for IAMOptimized S3 client
66b31fa is described below
commit 66b31fa749373ff7a3ccd83d97d900e0f536c8c3
Author: Alexey Minakov <si...@gmail.com>
AuthorDate: Fri Oct 30 19:04:18 2020 +0300
CAMEL-15779 - use DefaultCredentialsProvider for IAMOptimized S3 client
---
.../component/aws2/s3/client/impl/AWS2S3ClientIAMOptimizedImpl.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientIAMOptimizedImpl.java b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientIAMOptimizedImpl.java
index bf9410e..0bfe797 100644
--- a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientIAMOptimizedImpl.java
+++ b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientIAMOptimizedImpl.java
@@ -23,7 +23,7 @@ import org.apache.camel.component.aws2.s3.client.AWS2CamelS3InternalClient;
import org.apache.camel.util.ObjectHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import software.amazon.awssdk.auth.credentials.InstanceProfileCredentialsProvider;
+import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;
import software.amazon.awssdk.http.SdkHttpClient;
import software.amazon.awssdk.http.SdkHttpConfigurationOption;
import software.amazon.awssdk.http.apache.ApacheHttpClient;
@@ -70,7 +70,7 @@ public class AWS2S3ClientIAMOptimizedImpl implements AWS2CamelS3InternalClient {
isClientConfigFound = true;
}
if (configuration.getAccessKey() != null && configuration.getSecretKey() != null) {
- InstanceProfileCredentialsProvider cred = InstanceProfileCredentialsProvider.create();
+ DefaultCredentialsProvider cred = DefaultCredentialsProvider.create();
if (isClientConfigFound) {
clientBuilder = clientBuilder.httpClientBuilder(httpClientBuilder).credentialsProvider(cred);
} else {