holy-lambda

Sal Tosti 2022-09-05T15:11:19.274739Z

Hey All 👋, I’m working on setting up a babashka-based Lambda. When I execute the sam local invoke LambdaGenerateTemplate command locally I get a runtime error like:

:type java.lang.Exception, :message "[holy-lambda]: Handler example.core.LambdaGenerateTemplate not found!
I checked each of the following items and confirmed they appear correctly configured: * The Lambda resource in my template has a Handler: example.core.LambdaGenerateTemplate value * There is a file located at src/example/core.cljc with a namespace declaration of (ns example.core …) * Within the core.cljc file there is a function named LambdaGenerateTemplate * Within the core.cljc file there is an invocation of (h/entrypoint [#'LambdaGenerateTemplate]) I read over the https://fierycod.github.io/holy-lambda/#/babashka-backend-tutorial, but I did not see any missing steps in my config / setup. Can anyone shed some light on what I’m missing? 🙏

Sal Tosti 2022-09-06T11:12:17.858309Z

That worked like a charm! Thanks for taking a look at this Karol, much appreciated. 👍

Karol Wójcik 2022-09-06T13:42:30.554289Z

No worries. Sorry for a trouble!

🙌 1
Karol Wójcik 2022-09-05T20:38:39.957349Z

Could you please provide minimal reproducible steps?

👍 1
Sal Tosti 2022-09-05T21:25:52.178579Z

Thanks for the quick response Karol! :) I created a minimal example repo here: https://github.com/SalvatoreTosti/bb-lambda-min-repo-example. I was able to trigger the Handler example.core.LambdaGenerateTemplate not found! exception by running the following: 1. Run bb hl:babashka:sync 2. Run sam local invoke LambdaGenerateTemplate

Karol Wójcik 2022-09-06T01:10:56.823139Z

Ok, I see where the problem is. Basically the bb tasks are including the example.core in the classpath, because I'm using this namespace for testing. Please change the name of your namespace and you are good to go! Sorry for the inconvenience. I will patch it soon!

🙏 1
Karol Wójcik 2022-09-06T01:11:00.509539Z

All the best! 🙂