AMP AMP

VPC Peering on a different region in AWS

VPC Peering on different region in AWS

Introduction:

A VPC peering, a networking connection between two VPCs that enables to route traffic applying private IPv4 addresses or IPv6 addresses. This tutorial will cover creating VPC Peering on AWS.

Procedures:

I have shown in previous videos how to create VPC, EC2 instances, and Launch instances in different Regions. If you have any doubts about it please watch those videos for better clarification EC2 instance Creation: https://www.youtube.com/watch?v=s9traU-3fQI&t=15s VPC creation: https://www.youtube.com/watch?v=tffhGE48e4o&t=115s Launch EC2 instances in different Regions: Here I have already created VPC and launch Instances. Now I will launch the Instances in the different regions for making the peering connection Now I will launch Mumbai region Instance

snap1 Now I will launch the North Virginia Instance Now I will switch users and try to ping those instance IPs to each other but I didn’t get connections to each other. Now I will show how to create a peering connection to different region instances. For that go to peering connection and click peering connection and enter into the create peering connection Inside the peering connection enter the peering connection name and enter the source VPC to the source test box Now you have to do the acceptor tab. Here I am using a different region VPC so I have entered here another region VPC. For that, I need to go to that region (North Virginia) and enter the VPC window Then back the peering connection window and change the region to another region copy the VPC id then paste it to the acceptor text box then click create peering connection You cannot accept the peering request from the source you can only accept the request to the destination region. For that go to that region and click the peering connection and you can see the requesting acceptance select that and click action and accept a request Now the peering connection is active. Now, will add the rules for the peering connection to the routing table on both regions. For that go to VPC and click route table and edit routes add the peering connection to there

Now you will check the instances that are pinging each other With this method, VPC Peering on a different region in AWS is comes to an end.

FAQ
Q
Can I use my existing AMIs in Amazon VPC?
A
You can use AMIs in Amazon VPC that are registered within the same region as your VPC.
Q
Can I delete a default VPC?
A
Yes, you can delete a default VPC. Once deleted, you can create a new default VPC directly from the VPC Console or by using the CLI.
Q
Can a VPC span multiple Availability Zones?
A
Yes. you a VPC can span multiple Availability Zones.
Q
Can I change the size of a VPC?
A
Yes. You can expand your existing VPC by adding four (4) secondary IPv4 IP ranges (CIDRs) to your VPC. You can shrink your VPC by deleting the secondary CIDR blocks you have added to your VPC.
Q
Can I assign multiple IP addresses to an instance?
A
Yes. You can assign one or more secondary private IP addresses to an Elastic Network Interface or an EC2 instance in Amazon VPC.