I have few lambda functions that are connecting to Mongo Atlas cluster. Connection between Mongo Atlas and my AWS account is done via VPC Peering. Lambda functions are attached to this VPC.
I'm experiencing long cold starts of Lambdas, it's taking around 10 seconds for lambda to respond with VPC, and around 1-2 seconds without VPC. Based on changes that AWS made some time ago (https://aws.amazon.com/blogs/compute/announcing-improved-vpc-networking-for-aws-lambda-functions/) I shouldn't experience long cold starts.
Screenshots of my config:
Is something wrong with my setup?
We didn't find solution for that. To workaround that we've disabled VPC peering in Atlas.