holy-lambda

Benjamin 2021-10-22T08:25:19.003Z

How would you got about it if the lambda should transact stuff with datomic (dynamo) ? Atm I'm targeting graalvm

Karol W贸jcik 2021-10-22T08:33:20.003100Z

Don't get your use case. Could you elaborate?

Benjamin 2021-10-22T08:35:10.003500Z

basically I have a lambda that get's triggered when our app has a release on android/ios store. And I'd like to keep some memory so I can do some process only if both ios + android are released

Karol W贸jcik 2021-10-22T08:38:29.003700Z

> And I'd like to keep some memory so I can do some process only if both ios + android are released Don't get this part. Lambda is triggered per release for ios or android. You would like to do some action only if there is a new release for both platforms?

Karol W贸jcik 2021-10-22T08:43:38.004100Z

I need some clear explanation, what you have and what would you like to achieve 馃槃

Benjamin 2021-10-22T08:48:43.004500Z

yea basially having some state or database. So a quite general question

Karol W贸jcik 2021-10-22T08:56:38.004800Z

Do you have some experience with AWS Lambda on Node.js or Python? The approach is the same here as in all AWS Lambda runtimes. Basically the idea is that you have to initialize the connection only once per lambda initialization before handling the request. Therefore one of the options is init db before h/entrypoint macro or specify :init-hook for h/entrypoint.

(h/entrypoint [fns] {:init-hook (fn [] (init-database!))})

Benjamin 2021-10-22T08:57:33.005200Z

ah interesting. No I'm completely new to aws

Karol W贸jcik 2021-10-22T08:57:49.005400Z

One initialization for one lambda instance creation

Benjamin 2021-10-22T08:58:11.005600Z

I see and one lambda instance has some livetime or sth

Karol W贸jcik 2021-10-22T08:58:25.005800Z

Lambda can live up to 15min. If you're using dynamodb the integration is extremely straightforward.

馃憖 1
Karol W贸jcik 2021-10-22T08:59:48.006200Z

You can use faraday for this 馃槃

Karol W贸jcik 2021-10-22T09:00:27.006400Z

and if you would like to trigger a lambda upon a change in db you can also use HL for this