aws-lambda

2020-01-22T09:08:19.024600Z

Some people here?

jsyrjala 2020-01-22T09:09:06.024800Z

you can run normal Clojure or ClojureScript in AWS Lambdas

2020-01-22T09:10:22.025Z

That not the same. I want inline Clojure in my Cloudformation 🙂

2020-01-22T09:11:09.025200Z

At least I think it's not the same

2020-01-22T09:12:24.025400Z

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

2020-01-22T09:14:01.025800Z

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")

2020-01-22T09:15:09.026Z

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

2020-01-22T09:15:38.026200Z

@jsyrjala do you agree or do you have different thoughts?

jsyrjala 2020-01-22T09:16:55.026400Z

I have only used normal Clojure in Lambdas. Using sci could be worth a try.

andrewwhitehouse1 2020-01-22T11:00:29.027Z

@jsyrjala Hi Juha, I've been looking at Lambdas in Clojurescript on Node.js. Interested to hear more about your approach.

valtteri 2020-01-22T12:58:58.027600Z

@andrewwhitehouse1 here’s a small example project with CLJS using shadow-cljs and Serverless framework. https://github.com/vharmain/serverless-healthcheck

valtteri 2020-01-22T13:00:05.027900Z

That’s my current ‘goto setup’ with lambda and cljs. It’s relatively simple and I’m most happy with the small bundle sizes.

ghadi 2020-01-22T17:12:55.029Z

@jeroenvandijk I don't think inline code is supported for non node.js/python lambdas

2020-01-23T08:50:04.000100Z

@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

2020-01-23T08:53:15.000300Z

If sci works, self-hosted clojurescript would work as well I suppose

2020-01-23T10:38:06.000500Z

@ghadi After endless trial and error how to generate an AWS nodejs package... I can confirm this inline idea works! 🎉

mruzekw 2020-01-22T19:33:40.030300Z

Has anyone had any success with Lambda + Provisioned Currency and CLJ?

Jakub Holý 2020-01-27T14:43:47.001200Z

I guess the story here is the same as for Java? Somebody has surely blogged about that... :)

👍 1
mruzekw 2020-01-22T19:34:21.031200Z

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