2 ms·
Lambda does hold onto it in order improve response time. It connects to the database in a handler outside the context of a request, so you do hold onto N connec
by ec109685 6y ago
Lambda does hold onto it in order improve response time. It connects to the database in a handler outside the context of a request, so you do hold onto N connections persistently (at least until the lambda scales down).
With a connection pool, you don’t need to hold onto a connection longer than necessary, but you are right that you could implement it in such a way that you hold it for life of the request.