> For the complete documentation index, see [llms.txt](https://karansingh.gitbook.io/aws-saa-c02/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://karansingh.gitbook.io/aws-saa-c02/virtual-private-cloud-vpc/vpc-peering.md).

# VPC Peering

* A VPC peering connection is a **networking connection between two VPCs that enables you to route traffic between them using private IPv4 addresses or IPv6 addresses**.<br>
* Instances in either VPC can **communicate with each other as if they are within the same network**.<br>
* The **VPCs can be in different regions and different accounts**.<br>
* To send private IPv4 traffic from your instance to an instance in a peer VPC, you **must add a route to the route table that's associated with your subnet in which your instance resides**.
  * The **route points to the CIDR block of the peer VPC** in the VPC peering connection, and **specifies the VPC peering connection as the target**.

## Transitive peering

* Instead of using VPC peering, you can **use an AWS Transit Gateway that acts as a network transit hub**, to interconnect your VPCs and on-premises networks.<br>
* You have a **VPC peering connection between VPC A and VPC B, and between VPC A and VPC C**. <br>
* There is **no VPC peering connection between VPC B and VPC C**.
  * So, you **cannot route packets directly from VPC B to VPC C through VPC A**.

![](https://4079160698-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MOmHH1M7R1RV5MGm4F7%2F-MPFCKk1bvmx9RhM7sJ2%2F-MPFpC4yHpunBSUaG9go%2Fimage.png?alt=media\&token=2468a8a5-e671-4d00-a198-62b890909154)
