1 Answer
- Newest
- Most votes
- Most comments
3
Lambda functions execute in micro VMs. Lambda reuses the micro VM between invocations. For this reason we recommend you create the connection to the database outside the handler (in the init code) and leave it open. As the micro VMs are completely isolated, you can't use a connection pool as you do in servers. For this reason we created RDS Proxy. RDS proxy maintains a connection pool to the database. Your Lambda functions connects to the proxy instead of the directly to the database.
Relevant content
- asked 8 months ago
- asked a year ago
- asked 6 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago