holy-lambda

emccue 2022-07-22T18:07:39.387169Z

what is the best way to call aws from in a lambda? I like cognitect-aws but for the bb target idk if it would work

Karol Wójcik 2022-07-22T20:10:16.709489Z

It will work.

Karol Wójcik 2022-07-22T20:11:53.553649Z

There is a bb pod for this and as far as I remember there is also a cognitect-api fork that is compatible with babashka (no pod is required).

Karol Wójcik 2022-07-22T20:14:32.196179Z

In terms of a way to do a call to AWS from a lambda it’s extremely straightforward. Use the pod as you would do it locally and add all the required service permissions to Lambda (for instance via cloudformation).

emccue 2022-07-22T21:41:13.908579Z

maybe i just don't understand pods

emccue 2022-07-22T21:41:31.851399Z

how do I "package" a pod?

Karol Wójcik 2022-07-23T02:33:29.904839Z

As as an AWS template as you probably already pack your library dependencies.

Karol Wójcik 2022-07-23T02:37:12.032669Z

If you go through bb HL tutorial you learn how to create a layer for your bb deps (bb resolved libraries). To have a pods working you simply copy the definition of a layer, then point to a location where HL stores pods, change the name of the layer (template.yml) and reference the ARN of the layer in the definition of the lambda (template.yml).

Karol Wójcik 2022-07-23T02:38:17.879199Z

Here you can find a location of a pods: https://fierycod.github.io/holy-lambda/#/cli?id=cli-paths

Karol Wójcik 2022-07-23T02:40:58.234879Z

You can download them if you set them first in project HL options:pods in bb.edn. In the documentation you can find that the command which downloads both the pods and deps is bb hl:babashka:sync

emccue 2022-07-25T20:43:00.657449Z

we got a smattering of work to do to have our CI make zip files and not docker images so...pending

Karol Wójcik 2022-07-24T10:02:47.068999Z

@emccue please let me know if it helps ;)