-
Hi, I wanted to use your powertools-cloudformation and the first thing that happened was that an exception was thrown:
The reason was that beside software.amazon.awssdk:url-connection-client (that comes as dependency of powertools-cloudformation) I also have software.amazon.awssdk:apache-client in my classpath (that comes with software.amazon.awssdk:secretsmanager and software.amazon.awssdk:rds). I circumvented this issue by setting the system property as suggested, but I wondered if would be possible for you to switch the HttpClient. I don't know if apache-client SdkHttpClient is the standard client of awssdk, I just wanted to know if there is a specific reason why you use url-connection-client while rds and secretsmanager use software.amazon.awssdk:apache-client. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @schabe77, Thanks for the feedback, let me try and explain our thinking. As you've seen there are multiple HTTP clients available to use with the SDK. Lambda Powertools for Java tries to help by picking the best option when multiple exist, while still allowing customisation. The url-connection-client meets our tenet to keep our technology choices lean. It is the lowest memory usage client and has the fastest start up time, often a very important characteristic when using Lambda. From your feedback it looks like we've still got some work to do with meeting another of our tenets (Eases the adoption of best practices). If you could raise an issue with the problem you had that would be really helpful. Further on this subject, with the recent GA of the CRT HTTP client #1092 we will investigate whether this is a further improvement. Thanks, Mark |
Beta Was this translation helpful? Give feedback.
Hi @schabe77,
Thanks for the feedback, let me try and explain our thinking.
As you've seen there are multiple HTTP clients available to use with the SDK. Lambda Powertools for Java tries to help by picking the best option when multiple exist, while still allowing customisation.
The url-connection-client meets our tenet to keep our technology choices lean. It is the lowest memory usage client and has the fastest start up time, often a very important characteristic when using Lambda.
From your feedback it looks like we've still got some work to do with meeting another of our tenets (Eases the adoption of best practices). If you could raise an issue with the problem you had that would be rea…