java.lang.NoClassDefFoundError: com/amazonaws/auth/AWSCredentials with localstack module and AWS SDK2
See original GitHub issueWhen using the AWS SDK v2 the com.amazonaws.auth.AWSCredentials class is not present and a java.lang.NoClassDefFoundError is thrown.
Imho either the local stack module should declare a dependency on the AWS SDK v1 or not use the classes at all. (I’d prefer the latter).
my current workaround, is to add the classes just for tests:
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-core</artifactId>
<version>1.11.959</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
Issue Analytics
- State:
- Created 2 years ago
- Reactions:28
- Comments:5
Top Results From Across the Web
java.lang.NoClassDefFoundError: com/amazonaws/auth ...
lang.NoClassDefFoundError is thrown. Imho either the local stack module should declare a dependency on the AWS SDK v1 or not use the classes...
Read more >Localstack java.lang.NoClassDefFoundError - Stack Overflow
The code: here i try to make a connection to the local docker with the image of localstack v 0.11.6 and SQS as...
Read more >LocalStack Module - Testcontainers for Java
Testcontainers module for LocalStack, 'a fully functional local AWS cloud stack', to develop and test your cloud and serverless apps without actually using ......
Read more >Local Development with AWS on LocalStack - Reflectoring
The SDK provides client libraries in all the popular programming languages like Java, Node js, or Python for accessing various AWS services.
Read more >Localstack with the AWS SDK for Rust
You can use the Rust SDK with LocalStack by setting a custom endpoint, as shown in the following code example. ... Check crates.io...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is affecting me too
I got this issue too !