Hacker News new | ask | show | jobs
by josevalerio 893 days ago
Declare your connection outside of your handler function - this post is from 2017 but it shows it clearly:

https://www.jeremydaly.com/reuse-database-connections-aws-la...

It will get re-used across lambda invocations as long as the instance of it isn't killed which typically happens after a few minutes