Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS2 has 2 HTTP clients in "runtime" scope #19

Open
andrus opened this issue Aug 1, 2023 · 0 comments
Open

AWS2 has 2 HTTP clients in "runtime" scope #19

andrus opened this issue Aug 1, 2023 · 0 comments

Comments

@andrus
Copy link
Contributor

andrus commented Aug 1, 2023

software.amazon.awssdk:s3 depends on two HTTP clients at once - software.amazon.awssdk:apache-client and software.amazon.awssdk:netty-nio-client. Both are defined in the "runtime" scope by Amazon, and this is rather confusing (e.g. see aws/aws-sdk-java-v2#3040 ). By default the user will get an exception due to the missing client:

software.amazon.awssdk.core.exception.SdkClientException: Unable to load an HTTP implementation 
from any provider in the chain. You must declare a dependency on an appropriate HTTP implementation 
or pass in an SdkHttpClient explicitly to the client builder

And if the "runtime" scope is added to classpath, the user will end up with both clients on classpath (also not ideal, but seems to be required as the Apache is used for sync and Netty - for async (see #20, this is not implemented as of this writing))

We need to do something about this on the long term. Short term I suppose we need an explicit client modules ("bootique-aws2-client-apache", "bootique-aws2-client-netty") or something.

@andrus andrus changed the title AWS2 S3 client has HTTP client in "runtime" scope AWS2 has 2 HTTP clients in "runtime" scope Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant