MongoDB Atlas AWS VPC Peering Not Connecting
Quick answer
VPC peering and private endpoints need matching access list, route table and security group entries; they are not available on free M0 clusters.
Most likely fix: Check the tier
How to fix it
Try these in order — the most common fix is first.
1. Check the tier
- Network peering and private endpoints are not supported on Free (M0) clusters; use a Dedicated tier
Did this fix it?2. Complete the peering
- Accept the peering request in AWS
- Add a route for the Atlas CIDR to your route tables
- Add your VPC CIDR to Security > Network Access
Did this fix it?3. Allow the port
- Allow outbound TCP 27017 in the security group
- Test with nc -zv <node-host> 27017 from the instance
Did this fix it?4. Check private endpoint DNS
- Verify DNS resolves the private endpoint hostname
Did this fix it?
Symptoms
App in your VPC times out against Atlas while the public connection works.
Why it happens
- Peering unsupported on M0
- Route table lacks the Atlas CIDR
- Security group blocks 27017
- Peering not accepted or access list missing the VPC CIDR
- Private endpoint DNS misconfigured
This guide also covers
- mongodb atlas vpc peering not working
- mongodb atlas aws lambda connection
- atlas private endpoint timeout
Still not working?
If MongoDB Atlas keeps failing, you're not alone. See every MongoDB Atlas problem users report or the alternatives people switch to.
Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.
Talk to usThe same problem in other apps
All not loading, error messages & connection guides →
- Supabase Max Client Connections Reached (Supabase)
- Firebase auth/invalid-api-key Error (Firebase)
Other MongoDB Atlas errors
- MongoDB Atlas Connection Timed Out (IP Not Whitelisted)
- MongoServerSelectionError: Fix for MongoDB Atlas
- MongoDB Atlas Authentication Failed (bad auth)
- MongoDB querySrv ENOTFOUND / ECONNREFUSED Error
- MongoDB Atlas Free Tier (M0) Limits and Throttling
- MongoDB Atlas Cluster Paused (Resume or Auto-Pause)
- MongoDB Atlas Unexpected Bill: Why It's So High
- MongoDB Atlas Too Many Connections Error