Table of Contents
What is VPC Peering?
VPC peering connection enables us to route traffic across multiple VPCs using private IP addresses. Instances from different VPCs can communicate with each other as if they are within the same network. We can create a VPC peering connection between the VPCs in the same account, or between VPCs across different AWS accounts. Similarly, VPC peering can be done in the same region or across multiple regions.
Overview:
Using VPC peering, resources in the VPCs in different AWS Regions can communicate with each other using private IP addresses, without using a gateway, VPN connection, or network appliance. All inter-Region traffic is encrypted with no single point of failure or bandwidth bottleneck. The traffic remains in the private IP space on the global AWS backbone and never traverses the public internet. Hence it is a secure and cost-effective way to share resources between regions or replicate data for geographic redundancy.
Requirements for a VPC peering connection:
The requirements to establish a VPC peering connection between multiple VPCs:
If required, update the security group rules that are associated with your instance to ensure that traffic to and from the peer VPC is not restricted. If both VPCs are in the same region, you can reference a security group from the peer VPC-As a source or destination for ingress or egress rules in your security group rules.
With the default VPC peering connection options, if EC2 instances on either side of a VPC peering connection address each other using a public DNS hostname, the hostname resolves to the public IP address of the instance. To change this behavior, enable DNS hostname resolution for your VPC connection. After enabling DNS hostname resolution, if instances on either side of the VPC peering connection address each other using a public DNS hostname, the hostname resolves to the private IP address of the instance.
Multiple VPC Peering connection:

A VPC peering connection is a one-to-one relationship between two VPCs. We can create multiple VPC peering connections for each VPC. But there will be no communication between the VPC that is not directly peered with.
Limitations of VPC peering:
1. VPC peering connection quotas:
2. Overlapping CIDR blocks:
3. Transitive peering:

VPC peering does not support transitive peering relationships.
For example, let us consider three VPCs VPC-A, VPC-B, and VPC-C among which the VPC-A is peered with VPC-B and VPC-C. Hence the VPC-A can communicate with the other two VPCs. However, the VPC-B cannot directly connect with the VPC-C since there is no peering between them.
4. Edge to edge routing through a gateway or private connection:
The network routes associated with a VPC cannot be used by the resources in the peered VPC. For example, let us assume two VPCs VPC-A and VPC-B are peered with each other.
5. Inter-Region VPC peering connections:
6. Shared VPCs and subnets:
The actions such as describe, create, accept, reject, modify, and delete peering connections are allowed only to the VPC owners. Participants cannot work with peering connections.
Transit Gateway:
To overcome the limitations of the VPC peering, we can use Transit Gateway. Stay tuned for the next post about Transit Gateway.
We highly appreciate your patience and time spent reading this article.
For feedback reach us on [Facebook](https://www.facebook.com/profile.php?id=61554930566039), [Linkedin](https://www.linkedin.com/company/jumisa-technologies-private-limited), [X](https://twitter.com/jumisaTech)
Happing reading !!! Let us learn together !!!