Required value of type interface software.amazon.awssdk.identity.spi.IdentityProvider - IllegalArgumentException building a SqsClient #4609
-
Hi, anyone able to help successfully build a basic SqsClient using the SDK 2? When passing a credentials provider (even when using the default provider) to the SqsClient, it fails to retrieve the provider from the config map config.option(AwsClientOption.CREDENTIALS_IDENTITY_PROVIDER) (line ref) then throws an exception:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
@i-love-tea make sure all the Java SDK 2.x modules are using the exact same version. This is likely caused by a version mismatch between the You can check your dependency versions by running Update: just to complement my answer, to avoid this kind of errors we recommend to use the BOM artifact. This way you declare the SDK version in one place only, and all the SDK modules under the same groupID will use that specific version. Maven example: <dependencyManagement>
<dependencies>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.21.14</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId> <!-- no version needed -->
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>lambda</artifactId> <!-- no version needed -->
</dependency>
</dependencies> You can find more information in our Developer Guide - |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
@i-love-tea make sure all the Java SDK 2.x modules are using the exact same version. This is likely caused by a version mismatch between the
auth
and the service modules.You can check your dependency versions by running
mvn dependency:tree
.Update: just to complement my answer, to avoid this kind of errors we recommend to use the BOM artifact. This way you declare the SDK version in one place only, and all the SDK modules under the same groupID will use that specific version.
Maven example: