Hi! Has anyone used sam local with Lambada? I'm trying to do the AWS DevOps serverless workshop (https://github.com/awslabs/aws-serverless-workshops/blob/master/DevOps) in Clojure, and I'm currently getting an exception from my handler:
START RequestId: 33b3e09d-a79b-4971-b032-07b093ad2a8b Version: $LATEST
java.lang.UnsupportedOperationException: handleRequest (uni-api.core/G__189handleRequest not defined?)
at com.aws.codestar.projecttemplates.handler.HelloWorldHandler.handleRequest(Unknown Source)
Here's my project.clj
:
(defproject uni-api "1.0.0"
:description "Wild Rydes serverless devops workshop"
:url "<https://github.com/awslabs/aws-serverless-workshops/blob/master/DevOps>"
:dependencies [[org.clojure/clojure "1.9.0"]
[uswitch/lambada "0.1.2"]]
:profiles {:uberjar {:aot :all}}
:uberjar-name "uni-api-1.0.0-STANDALONE.jar")
And my core.clj
:
(ns uni-api.core
(:require [uswitch.lambada.core :refer [deflambdafn]]))
(deflambdafn com.aws.codestar.projecttemplates.handler.HelloWorldHandler
[in out ctx]
(println "OMG I'm running in the cloud!!!111oneone"))
I have com/aws/codestar/projecttemplates/handler/HelloWorldHandler.class
and uni_api/core$G__189handleRequest.class
files in my uberjar.
Yeah we ran into something similar. Try unzipping the jar or pointing SAM local to the target/ dir