I have an Aurora MySql cluster that was made public so I could connect to it from my local workstation. I created an aspnetcore project that can connect to the database, query and return the results to me if I run the lambda locally in VS Code.
When I deploy the Lambda into AWS (uploading a published .zip) the lambda executes APIs (via API Gateway) that don't interact with the database just fine. As soon as I hit an API that attempts to connect to Aurora, it times out and fails.
The Lambda and RDS are in the same VPC, and within the same subnets. I've tried with the RDS being both public and private, neither work. My Lambda has an IAM role assigned to it that grants it full RDS access and Full VPC Access. What additional would a lambda need in order to hit Aurora?
I've also tried running the Lambda within the same VPC/Subnets, and without any VPC. When I run it without a VPC attached, I get back the entire stacktrace in Cloudwatch saying it timed out trying to connect. When I run the Lambda within the VPC/Subnets, I don't get any of the log messages from the Lambda written to CloudWatch.
Edit to show Security Group setup
Aurora MySql RDS
Lambda
Security Group