i can't successfully connect to RDS from Amazon Lambda in production. For Amazon Lambda i'm using Serverless framework, executing sls offline i can connect with RDS from localhost, but in production Amazon Lambda doesn't.
Both are in same VPC, in same security group, that has all traffic inbound access, and a rule that is pointing to Vpc's CIDR.
I have these permissions attached: AmazonRDSFullAccess, AWSLambdaFullAccess, AmazonVPCFullAccess, AWSLambdaExecute and AWSLambdaVPCAccessExecutionRole.
Thank's for help.
A Lambda function that is outside of a VPC cannot access an RDS instance that is inside a VPC. For information on how to configure a Lambda function's network settings, see Configuring a Lambda function to access resources in a VPC.
Lambda functions can't connect directly to a VPC with dedicated instance tenancy. To connect to resources in a dedicated VPC, peer it to a second VPC with default tenancy .
I had this issue and the following is a summary of the steps I took to resolve:
Good luck.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With