Best in this case is to use the same VPC for your lambda as the RDS instance. This is cheaper and is more secure. You don't have to setup a internet gateway and elastic IP. And you can only access your RDS instance from within the VPC.

You can enable this using Lambda management console. Select Lambda function which need access to RDS instance and then go to Configuration -> Advanced settings and select the VPC (which is your RDS instance is in) you need it to access.

For instances attached to the same security group—make the security group the source for the inbound rule and the destination for the outbound rule.

For instances in different security groups—make sure that both security groups allow access to one another.

If this is still not working check the error message that is returned when setting up the connection with RDS. Timeout means issue with network.

find out more here https://aws.amazon.com/premiumsupport/knowledge-center/connect-lambda-to-an-rds-instance/