How to properly close the database connection in a lambda function?

Yes. Just close it at the bottom of the handler function but remember to move the open to the top of the handler function or it won’t run a second time

1 Like