AWS Series — Handling multiple VPCs
Sometimes we might have a need for multiple VPCs in real-time scenario to support multiple environments and it may be necessary to connect these VPCs to each other.
One VPC with all the external applications which can be for Production Web VPC and Content VPC to upload all our product information and Intranet to do all the backend related tasks.
What is VPC Peering?
- It allows you to connect 1 VPC with another via a direct network route using private IP addresses.
- The instances behave as if they were on the same private network.
- You can peer VPCs with other AWS accounts as well as with other VPCs in the same account.
- Peering is in a star configuration. For Example, 1 central VPC peers with 4 others). No transitive peering.
- You can peer between regions.

The above diagram represents Transitive Peering. Let’s say we need VPC B to be able to connect to VPC C it cannot connect via VPC A. It should add one more new connection to VPC C in order to talk to VPC C.
How to create VPC Peering?
Go to VPC > Peering Connections > Create

Give it name. Select the VPC that we would like to create Peering connection. Select the account to connect with other VPC and the region.

When you select the Region it auto populates all the VPCs in that region. We can select one. But make sure you do not have same CIDR block assigned to the VPC. Then Create.
It would wait for acceptance of peering connection. We can go to actions and select the accept which will establish the Peering connection.
Happy Learning!!