Hello, not sure if you already did this, but just including two instances (in your case lambda and rds) in the same subnet and the same security group doesn't open any communication ports - you need to define the specific security rules to open the DB port for communication.
If you want to keep them in the same security group, you'll have to create a self-referencing rule in this group with the right DB port to open (depending on your database engine) and indicating the source as the same security group.
Timeout error accesing MySql RDS from a Lambda functionasked 5 years ago
Bypass CORS policy on S3-hosted site connected to RDS database
Psycopg2 on AWS Lambda not connecting to RDS databaseasked 8 months ago
AWS Lambda not able to connect to public RDS instanceasked 5 months ago
Why can't I find my RDS database from my lambda function?
Handler error when connecting lambda function to RDS database
Unable to find database in RDS consoleAccepted Answerasked 2 months ago
Can't connect to an RDS Instance from Lambda (different account tough)asked 2 years ago
Connect to MemoryDB from LambdaAccepted Answerasked 3 months ago
Unable to connect to RDS databaseasked a year ago