babashka

https://github.com/babashka/babashka. Also see #sci, #nbb and #babashka-circleci-builds .
borkdude 2021-01-21T20:42:59.003100Z

Welcome @coyotesqrl!

👋 1
steveb8n 2021-01-21T23:08:10.003800Z

Q: is there a technique/example of using bb as an AWS lambda handler?

steveb8n 2021-01-22T08:00:59.017200Z

I prefer the latter. I do all docker builds locally and that sounds simpler

steveb8n 2021-01-21T23:08:50.003900Z

would be simpler than setting up a Graal clj or java project. might be worth the perf tradeoff

lukasz 2021-01-21T23:24:33.004700Z

New Docker runtime stuff should make it pretty easy to use bb in Lambda, no more layers etc

lukasz 2021-01-21T23:26:51.005100Z

It boils down to doing a GET to get the args, and POST-ing the result: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-api.html

borkdude 2021-01-21T23:31:08.006900Z

I notice he's doing some requests in this namespace similar to what you describe: https://github.com/dainiusjocas/babashka-lambda-layer/blob/ddec711dcb261eb1fa2798da45c060c0112b3887/src/lambda/impl/runtime.clj#L6

lukasz 2021-01-21T23:33:11.008400Z

I think this is based on the "old" way of providing custom runtimes for Lambda, now you "just" build a container image and bundle whatever files and tools you need. The "layers" approach had some limitations in terms of size and what you can actually ship

lukasz 2021-01-21T23:33:41.009100Z

but, that namespace does look handy - I think AWS just opened up all the nitty gritty of how Lambdas are put together by introducing Docker support

lukasz 2021-01-21T23:34:03.009700Z

needless to say, I'll be trying it out as we need to replace a couple of Lambdas using the Java runtime

borkdude 2021-01-21T23:34:50.009900Z

cool

steveb8n 2021-01-21T23:37:14.010Z

exactly like that. I’ll need to update it to get the latest bb with aws pods but that’s great.

steveb8n 2021-01-21T23:37:17.010200Z

thanks!

steveb8n 2021-01-21T23:39:45.010600Z

that’s good to know. I’ll try pure docker as well

borkdude 2021-01-21T23:53:57.010700Z

Make sure to force downloading the pod so it's already available in the docker image

borkdude 2021-01-21T23:54:33.010900Z

it's downloaded to $HOME/.babashka so you'd have to copy that dir inside the image after you call load-pod