Which is preferred, Lambda->RDS Proxy->RDS or Lambda->RDS?

0

When considering the configuration of connecting from Lambda to RDS, there are two main methods

  1. Lambda→RDS Proxy→RDS
  2. Lambda to RDS

Let me ask two questions.

  1. Is it best practice in the AWS Well-Architected framework to sandwich the RDS Proxy in between, or is it acceptable to connect directly from Lambda to RDS?

  2. Under what assumptions can we determine that a configuration without RDS Proxy is acceptable?

1 Answer
0
Accepted Answer

Hello.

AWS recommends using RDS Proxy in production environments.
For example, when creating an API using Lambda that generates a large number of connections in a short period of time, RDS Proxy should be useful because a large number of connections will occur.
On the other hand, for Lambdas that are executed infrequently, such as once every hour, I think it is better to connect directly to RDS.
https://docs.aws.amazon.com/lambda/latest/dg/services-rds.html

You can connect a Lambda function to an Amazon Relational Database Service (Amazon RDS) database directly and through an Amazon RDS Proxy. Direct connections are useful in simple scenarios, and proxies are recommended for production. A database proxy manages a pool of shared database connections which enables your function to reach high concurrency levels without exhausting database connections.

profile picture
EXPERT
answered 2 months ago
profile picture
EXPERT
reviewed 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions