Aurora Postgres Serverless V2 and Lambda

1

I'm wondering if Amazon has solved the connection pooling problem that is mentioned in StackOverflow posts dating back to 2017 when performing CRUD from a Lambda function. My application is Lambda and API Gateway driven. I don't like the idea of creating and destroying connections in Lambda functions that perform one operation/transaction. What are my options with Serverless V2?

bruce
已提問 2 年前檢視次數 742 次
1 個回答
5
已接受的答案

AWS released RDS Proxy a while back for these use cases. Aurora Serverless v2 now supports it - see https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html.

專家
已回答 2 年前
profile pictureAWS
專家
Uri
已審閱 2 年前
  • I would just add that you do not need to create and destroy the connection in each invocation. Just create the connection at function init time and let it remain open.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南