aws-lambda

Jason 2022-02-24T20:32:35.539279Z

hi i'm a newbie to running clojure projects on aws lambda and im coming across the following error. I uploaded a standalone jar for a clojure project that I generated using "lein uberjar". I suspect this is something very simple that happened even before the program is run. any thought is much appreciated!

Kevan 2022-02-24T22:06:56.120679Z

Check that the name of your handler matches what the lambda is expecting.

Jason 2022-02-24T22:17:17.986809Z

Thanks for the help! my handler is "thesis-main.core::main" (without the quotation marks). I do have a function called "-main" (without quotation marks) in my clojure code. Is this considered a match? If not, what do you recommend I have in stead? Thank you!

Kevan 2022-02-24T22:34:31.930579Z

Mmmm, can you post the ns that your handler file is in? The lambda I was working on the other week has looks like:

  (ns handler
     (:gen-class
   :implements [com.amazonaws.services.lambda.runtime.RequestStreamHandler])
  (:require [clojure.data.json :as json]...)

Kevan 2022-02-24T22:35:41.145539Z

And the runtime setting in aws the Handler is handler

Jason 2022-02-24T23:34:13.447539Z

My handler setting is in the picture below and that code snippet is how i referenced it in my code. I'm not sure if I'm doing it correctly though. Thank you!

(ns thesis-main.core
  (:gen-class))
(require '[clojure.set :as s])