Node.js app in AWS Elastic BeanStalk can't connect mongodb atlas via privatelink


I have been following these instructions and I can’t get connection to worg between my elastic beanstalk Nodejs app and DB. I have VPC setup in my aws enviroment and my elastic beanstalk app is in same VPC. I created interface endpoint in that same VPC (followed with this instruction Connecting Applications Securely to a MongoDB Atlas Data Plane with AWS PrivateLink | AWS Partner Network (APN) Blog). If I whitelist elastic beanstalk IP then connection works, so I assume my connection string is correct, but if I remove that IP from atlas whitelist then connection doesn’t work. I have test many thing but I can’t get privatelink connection work.

Hey did you find the solution?

Please try with the below link.

Ensure you created the Privatelink URI for MongoDB Atlas and use the correct VPC in the Elastic Beanstalk.