winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
4.8k stars 189 forks source link

best practice for Lambda DB connection #5529

Open ekeren opened 6 months ago

ekeren commented 6 months ago

Use Case

It is now possible to implement the best practice described by atlas here

Including:

Proposed Solution

No response

Implementation Notes

No response

Component

SDK

Community Notes

marciocadev commented 6 months ago

Hey @ekeren ,

The same concept can be applied to all resources in AWS (SQS, SNS, DynamoDB, etc).

Define the client outside the handler to instantiate only during container loading and reuse it for each execution.