Why does my Lambda function fail to connect with my RDS instance given the following Pulumi setup script?
I am using the following Pulumi script (in Python) to attempt to create an RDS instance and a Lambda function which will connect with it. I create a security group for the RDS instance allowing inbound traffic from the Lambda through port 3306 and a security group for the RDS instance allowing inbound traffic from the Lambda security group. The lambda even shows as being “connected” to the RDS instance in the “Configuration -> RDS Databases” tab of the AWS UI. However, whenever I run the lambda, it cannot connect. I receive the error “Can’t connect to MySQL server on ‘mysql5748c55.c1wk2emosjje.us-west-2.rds.amazonaws.com:3306’ ([Errno -2] Name or service not known)”.