holy-lambda

viesti 2021-04-22T05:59:51.074800Z

Thinking that a Lambda will usually talk to some number of AWS services, so aws-api (or aws-java-sdk, haven't tested how well that compiles with native-image) probably get's used. Nice that there's a aws-api example (https://github.com/FieryCod/holy-lambda/tree/master/examples/sqs-example), thinking that should probably have pod-babashka-aws example too 馃檪 https://github.com/babashka/pod-babashka-aws

viesti 2021-04-22T06:02:06.076600Z

since a pod is a subprocess to run, I guess pod-babashka-aws should then be either included as a dependency in a client project, or even bundled into the babashka layer, though then there are two things to updated in a layer: babashka and aws pod

viesti 2021-04-22T06:04:15.078800Z

hum, did layers have versioning... just thinking that if a user has many Lambdas that all share a layer and maybe just one of the Lambdas needs an update to the shared layer, then user has to take care that the updated layer works in all the other Lambdas too, hum

Karol W贸jcik 2021-04-22T06:19:45.082700Z

Holy-lambda will provide only one layer which will be versioned. Each time babashka bumps it's version or there is new Clojure version I will update a layer and user will have to manually (at least for now) update template.yml layer ARN. In next release holy-lambda will provide a special step to bundle pods (if user uses any) in native-deps/*. Therefore, you will be able to add arbitrary artifacts to deployment.zip.

viesti 2021-04-22T06:30:26.083500Z

ah right, version is in the layer ARN even

Karol W贸jcik 2021-04-22T06:32:25.083800Z

Ahh. Would love to implement babashka tasks

Karol W贸jcik 2021-04-22T07:57:56.084600Z

Still need to figure it out whether packed pods will work if passsed to a babashka classpath. Hope it will work that way

viesti 2021-04-22T08:34:13.085600Z

yeah, haven't used pods myself either, but would probably be neat to have holy-lambda example with this 馃檪 https://github.com/babashka/pod-babashka-aws

Karol W贸jcik 2021-04-22T08:35:29.087Z

Figuring that part out with borkdude.

馃憤 1
viesti 2021-04-22T08:35:51.087500Z

thinking along the lines of

#?(
:bb
(require '[babashka.pods :as pods])
(pods/load-pod 'org.babashka/aws "0.0.5")
(require '[pod.babashka.aws :as aws])
:clj
(require '[cognitect.aws.client.api :as aws]))

(def s3 (aws/client {:api :s3}))

viesti 2021-04-22T08:36:15.088Z

+ some magic to make the pod appear on bb, otherwise use clj branch elsewhere 馃槃

Karol W贸jcik 2021-04-22T08:37:44.088500Z

Yep. But you still have to provide pod to aws lambda runtime somehow

Karol W贸jcik 2021-04-22T08:38:42.089200Z

I would rather avoid re-downloading pod in runtime context 馃槃

Karol W贸jcik 2021-04-22T09:08:18.089700Z

Ok borkdude explained to me how it should work 馃槃

馃憤 1
viesti 2021-04-22T12:42:44.090200Z

learning myself by reading the conversation 馃檪

anbz 2021-04-22T10:26:16.089900Z

@anbz has joined the channel

馃憢 3
stask 2021-04-22T14:12:42.090700Z

@stask has joined the channel