I followed the docs here: https://www.mongodb.com/docs/atlas/security-private-endpoint/#make-sure-that-your-security-groups-are-configured-properly-1
I have a VPC with a private and a public subnet. The VPC endpoint is configured and both active on the AWS and the Atlas side.
In the Atlas UI I got the connection string for the PrivateLink connection.
When I try to connect a AWS Lambda function, residing in the private subnet, the connection times out.
Connection string looks like this: mongodb+srv://test-user:REDACTED@development-pe-0.a29cq4z.mongodb.net/?retryWrites=true&w=majority
Any help would be appreciated.
Hi @Florian_Bischoff,
Are you still having issues with connecting via the private endpoint? If so, I was wondering if you could provide the following details:
- What type of cluster you’re trying to connect to (serverless or dedicated M10+)
- The full connection error message
- Is the endpoint created in the same region as the Atlas cluster?
- Driver and driver version you’ve attempted to connect with
Regards,
Jason
I know this is an old one, but I have the same issue and can’t figure out what to do:
I have an AWS lambda in a private subnet, that is connected to a Serverless - deployed in the same region - cluster via a Private Link. I followed all the instructions and the endpoint is configured correctly. but the Lambda times out when trying to connect to the endpoint address. If I try to connect to the non-endpoint address of the cluster, the connection is successful.
Is there any issue with service name resolution in a lambda? Or any idea what is the problem? I am for now using IP-based access through the public internet, but it seems silly, as everything is running in the eu-west-1 zone.