Fork me on GitHub

If you've ever struggled with AOT and packaging misery (NoClassDefFoundException, etc.) while getting Clojure lambdas to work (via any of the libraries like lambada, etc.) you don't need any of that! Instead:

(ns the.namespace)
(deftype Lambda []
  :load-ns true
  (handleRequest [this in out context]
     YOUR CODE))
Uberjar it up and then point AWS to "the.namespace.Lambda" as the entry class. (The load-ns bit means load the containing namespace when this deftype's class gets loaded by AWS)

👏 4
👍 4