- Newest
- Most votes
- Most comments
Hello.
Have you configured the secret manager?
If you use an RDS proxy, you must configure a secret manager to store the RDS password and make it accessible from the RDS proxy.
https://aws.amazon.com/jp/blogs/compute/using-amazon-rds-proxy-with-aws-lambda/
Hi Rohan,
You Access denied can come from various issues, so without more information on the permissions, the java code and RDS configuration, it's hard to help much more. But let's step back a bit if you don't mind.
I'm concerned to see that your RDS instance is "Publicly Accessible". This is considered bad practice and can have serious consequences. I invite you to put your RDS in a private subnet and configure your lambda to access your RDS instance through an RDS proxy with IAM authentification instead.
I encourage you to read about RDS Proxy for managing database connections, especially if your Java Lambda function makes frequent short database connections or opens and closes many connections. RDS Proxy helps in managing connection pooling, thus allowing your Lambda function to scale without exhausting database connections. Here is a short intro video about RDS Proxy.
Great tutorial here : Using Amazon RDS Proxy with AWS Lambda
Another great start is : How do I configure a Lambda function to connect to an RDS instance?
Relevant content
- asked 5 years ago
- Accepted Answerasked 4 years ago
- asked 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
It was indeed the secret manager issue. Thanks !