Home:ALL Converter>AWS Lambda - RDS Proxy creating a connection takes more time

AWS Lambda - RDS Proxy creating a connection takes more time

Ask Time:2023-01-08T23:41:15         Author:Nithish Subramaniyan

Json Formatter

As we can't use native DBCP or any kind of java connection pool in AWS Lambda I have been using RDS proxy to connect MYSQL DB, But Still it takes 5 to 6 secs to make connection but I need the response from the lambda in <1 secs it there any way of keeping the connection warm. I'm using DriverManager.getConnection to get connection from RDS proxy

I have tired to connect proxy using java.sql.DriverManager

Connection con = DriverManager.getConnection(("DB_Primary_IP"),("DB_Username"),("DB_Password"));

Author:Nithish Subramaniyan,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/75049101/aws-lambda-rds-proxy-creating-a-connection-takes-more-time
yy