AMP AMP

How to Create VPC Peering on AWS

To create VPC Peering on AWS

Introduction:

A VPC peering, a networking connection between two VPCs that allows to route traffic using private IPv4 addresses or IPv6 addresses.

Procedure:

For Creating VPC peering we have to create VPC and EC2 instances. For that, I have to create a VPC. I have already posted how to Create VPC on AWS. Please refer to that video if you have any doubts about VPC creation. Link for VPC creation Here I am creating RED VPC and Linux help VPC. Once the VPC creation is completed the I have to EC2 instances. Even I have posted a video for the EC2 instance creation. Please refer to the video if you have doubt about it. Link for EC2 creation The instances are created now I am launching the instances for that select the instance and click the connect the option to control the Instance. Now I am successfully taking access to Linux help instance SNAP1 SNAP2

Now I will connect another instance by using the same way. Finally, I have connected to the RED instance Now I will check these instances are communicating with each other or not by pinging there Ips The instances are not able to communicate with each other because the availability zone is not the same. If you want to communicate the instances to each other you have created a peering connection to those VPC. Now I will create VPC for that go to AWS Console and got to VPC and there you can Peering connection click that option and click create peering connection: Enter the peering connection name and enter the source and destination VPC names and click create peering connection and accept the request:

Finally defines the policy for peering connection to the routing table. For that click the routing table and select the routing table and edit route add the destination IP and add the target column to peering connection ID and click save the route The same steps I follow to another routing table Now check the instances. Those different availability zone instances are communicating with each other. With this method, VPC Peering on AWS is comes to an end.

FAQ
Q
Is there possible to create a peering connection between the same IP series VPC?
A
No, you cannot create a peering connection to the same IP series VPC.
Q
What is needed to create a VPC creation?
A
To create a VPC creation it needs a source and destination VPC.
Q
Can we communicate the instances in different regions?
A
Yes, you can communicate the instances from the different regions using a peering connection.
Q
If there any possibilities to communicate different availability zone instances with each other without the peering connection?
A
No, If there is no peering connection between the instances those cannot communicate with each other.
Q
What is Peering?
A
A VPC peering, a networking connection between two VPCs that allows to route traffic using private IPv4 addresses or IPv6 addresses.