VPC peering from one aws vpc to 2 atlas projects?

Hey All,
Is it currently possible to connect to 2 different atlas projects from the same VPC?
I have one aws vpc and 2 atlas projects I’d like to connect to all in the same region. When I create a cluster or project I dont see options for specifying its CIDR block, so both atlas projects have the same CIDR block by default. Therefore when I try to create the routing tables, I cannot route to both atlas projects at the same time.

any thoughts?

Hello @Brandon_Foster,

Welcome to the MongoDB community!

My name is Brock and I’d love to help you with this!

So I have some questions that I need answered for clarity if I may:

  1. What Atlas Cluster tier are you using for each cluster?
  2. What MongoDB Drivers are you using?
  3. Would it be possible to gain more information on the use case of your application and these Atlas databases?



Hello @Brandon_Foster,

The problem with this is Atlas will default a CIDR unless peering is established prior to building clusters in the project.

The best solution to this situation is as follows:

  • Create new project
  • Set up peering in new project
  • Create new cluster
  • Use migration to migrate data to new cluster
  • Switch apps to new cluster
  • Delete old cluster and project

The other way to correct this, but it would incur extra costs is by using private endpoints.



1 Like

Thanks Brock. I’ll try it out!

I have the same problem. Is there any way around this without downtime?

// Viktor

Can PrivateLink be the way to go instead? Or same problem?

Yes Private Endpoints should accomplish what you need without worrying about the CIDR overlap