# AWS - VPC Peering

<figure><img src="https://2332860236-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq6mjlFfyDOi3mV0lemKE%2Fuploads%2FtzMcuRYD67dsF9khLlvM%2Fimage.png?alt=media&#x26;token=08ca8d55-7c4a-4f74-961d-9224f32b87ae" alt=""><figcaption><p>VPC Peering : Block Diagram</p></figcaption></figure>

***

Steps to configure the above diagram :&#x20;

1. Create two VPCs , & assign the subnets, internet gateways , Route tables accordingly
2. Launch the EC2 instances on each of the VPCs created
3. Create the VPC peering connection on the VPC dashboard & assign the "FROM" & "TO" connections on the peering connection
4. Create the record on the route tables to pass the connection through the CIDR of the VPCs
5. Modify & configure the security groups accordingly&#x20;

***

Here we have sucessfully configured the VPC peering on AWS&#x20;

<figure><img src="https://2332860236-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq6mjlFfyDOi3mV0lemKE%2Fuploads%2F9MvJhdR7Ln359q2VtAG4%2Fimage.png?alt=media&#x26;token=1dc3019b-bc28-4964-9a07-70b053c72d31" alt=""><figcaption><p>Problem with the VPC Peering </p></figcaption></figure>

The VPC peering feature is used to connect only two instance at a time but VPC peering cannot work if there are more than two VPCs to connect with, So for this scenario the VPC Transit Gateway is used.
