All resources inside a vpc can automatically communicate with each other via their private ip addresses, irrespective of which public/private subnets they belong to. However it is also possible for resources in one vpc to communicate with resources in another vpc. This is done by setting up a “vpc peering” connection.
A VPC peering connection is a network connection between two VPCs which lets instances from one vpc to communicate with instances in the other vpc as if they are within the same network.
There are a few conditions that needs to be met for setting up vpc peering:
- Both VPCs needs to reside in the same region. I.e. you can’t set up vpc peering between vpc’s in different regions.
- Each VPC’s CIDR block range is not allowed to overlap. Otherwise it would potentially