For a Lambda to access an AWS RDS database instance, it needs to be in the same VPC as the RDS instance. However, if you haven’t created and assigned a role with persmissions for the Lambda to access the VPC, you’ll see this error when creating your Lambda:
![](https://i0.wp.com/www.kevinhooke.com/wp-content/uploads/2020/03/image-12.png?resize=525%2C49&ssl=1)
To fix this per steps in the tutorial here, create a role with permission ‘AWSLambdaVPCAccessExecutionRole’.