Fork me on GitHub
#holy-lambda
<
2022-07-22
>
emccue18:07:39

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ójcik20:07:53

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ójcik20:07:32

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

emccue21:07:13

maybe i just don't understand pods

emccue21:07:31

how do I "package" a pod?

Karol Wójcik02:07:29

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

Karol Wójcik02:07:12

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ójcik02:07:58

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

Karol Wójcik10:07:47

@U3JH98J4R please let me know if it helps ;)

emccue20:07:00

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