I\'m writing a custom plugin for Leiningen that will help in deploying AWS Lambda functions written in Clojure. I\'m using aws-java-sdk-lambda
version 1.
First question: is this a known issue?
This is a known issue, and one that many people writing Leiningen plugins face. The root cause is that Leiningen builds an uberjar with all of its dependencies, and those dependencies are not shaded. This means that if there is any collision between Jackson classes, Leiningen's one will always be chosen. What makes this especially devious is that you won't get any warnings about conflicting dependencies, as the JARs don't conflict, but the contents of them do.
Here's a few examples of this problem: https://github.com/s3-wagon-private/s3-wagon-private/issues/38, https://github.com/technomancy/leiningen/issues/2215.
Second: Does anyone have any suggestions for working around this problem?
Issues with Clojure inter-dependency with different major versions of the same library has some suggestions for the general case, although it gets a little trickier when Lein's dependencies are uberjarred.
I think your best bet at this point would be to shade the Jackson dependency and the AWS SDK.
Leiningen master no longer depends on Cheshire though, and when 2.8.0 is released you should have less problems.