Fork me on GitHub
#clojure-uk
<
2020-04-10
>
seancorfield04:04:54

Mornin' Happy Friday!

Rachel Westmacott11:04:10

Has anyone here got much experience using Clojure/Clojurescript on AWS Lambda?

jasonbell12:04:54

@peterwestmacott I’m fairly sure uswitch had support framework for doing lambda functions in AWS.

flefik14:04:55

yeah they do

Rachel Westmacott17:04:24

Oh thanks, I'll take a look.

Rachel Westmacott17:04:56

I was imagining using clojurescript, but that looks super straightforward, so I'll start there. Thanks again!

alexlynham18:04:15

@peterwestmacott what are you trying to do with it? I've done a fair bit and run a couple of workshops

Rachel Westmacott18:04:51

Probably some https endpoints to write small bits of json to s3.

alexlynham18:04:15

imo there's two good ways to do it

alexlynham18:04:23

cljs-lambda library is good

alexlynham18:04:52

or you can go directly to node via cljs and either shadow-cljs or something like node figwheel

alexlynham18:04:06

iirc for the workshop it was node-figwheel?

alexlynham18:04:36

basically cold starts make the JVM way way slower than node so cljs is 100% the way to go

alexlynham18:04:16

& honestly I need to re-write this workshop to use shadow and lean more heavily on going direct to the node-aws-sdk

alexlynham18:04:12

but yeah, the serverless framework (confusingly named, it's a node framework that gives you offline testing etc) makes lambdas on aws p easy in node and cljs can speak to it pretty easily

alexlynham18:04:55

& here's the end state of the workshop I think.. not the nicest code I've ever done but shows how it fits together I think https://github.com/envoylabs/cljs-serverless-workshop/blob/add_csv_and_cljs_lambda/src/cljs_serverless_workshop/core.cljs

alexlynham22:04:31

was supposed to run an updated version of this workshop at clojurex before it got cancelled lol

Rachel Westmacott14:04:42

that first link looks perfect!