Some people here?
you can run normal Clojure or ClojureScript in AWS Lambdas
That not the same. I want inline Clojure in my Cloudformation 🙂
At least I think it's not the same
As far as I know I cannot do inline code when I use normal Clojurescript https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-zipfile
So I need a custom layer that is compatible with the standard node versions and add the sci package. In the inline code i will do something like
sci.eval-string("my-pr-str-ed clojure code")
The problem with normal Clojure is that there is no support for inline functions. With a normal Clojurescript layer I'm not sure, but than your layer will become really big to have it support eval
@jsyrjala do you agree or do you have different thoughts?
I have only used normal Clojure in Lambdas. Using sci could be worth a try.
@jsyrjala Hi Juha, I've been looking at Lambdas in Clojurescript on Node.js. Interested to hear more about your approach.
@andrewwhitehouse1 see https://github.com/jsyrjala/aws-lambda-serverless
@andrewwhitehouse1 here’s a small example project with CLJS using shadow-cljs and Serverless framework. https://github.com/vharmain/serverless-healthcheck
That’s my current ‘goto setup’ with lambda and cljs. It’s relatively simple and I’m most happy with the small bundle sizes.
@jeroenvandijk I don't think inline code is supported for non node.js/python lambdas
@ghadi You are right. Therefore I want to use a node.js lambda with sci 🙂 I've been able to add a Layer to an inline lambda, but I need to figure out how to call the other layer. No success yet. I'll create a normal layer-ed lambda first. In the interface the look the same so I'm still positive
If sci works, self-hosted clojurescript would work as well I suppose
@ghadi After endless trial and error how to generate an AWS nodejs package... I can confirm this inline idea works! 🎉
Has anyone had any success with Lambda + Provisioned Currency and CLJ?
I guess the story here is the same as for Java? Somebody has surely blogged about that... :)
Up until provisioned currency I was thinking CLJS would be the best for high performing lambdas, but with provisioned currency we can just use the JVM