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. Instances in either VPC can communicate with each other as if they are within the same network.
VPC peering connections are limited on the number of active and pending peering connections that you can have per VPC.
VPC peering is a technique for securely connecting two or more virtual private clouds, or VPCs
Step-1. As per the above VPC Peering connection architect Create a VPC and subnet and Rout table.
- Associate the subnet with the route table.
Step-2. Create the Internet Gateway and attach the VPC.
- Edit and add the Internet Gateway in the route table.
Step-3. Create the EC2 Instance with VPC-A network settings and Publich IP enabled on the Subnet and Instance.
Step-4. As the above steps we have created another VPC, Subnet and Route table.
- Associate the Subnet on the route table and create EC2 Instance.
Step-5. We need to copy the .pem key from local and paste in the Primary VPC-A to get SSH access for another VPC-B.
- Not getting connect to the secondary VPC EC 2 Instance via SSH.
**Step-6. **Create a peering connection.
- Accept the Peer Request.
Step-7. Add the Secondary IPV4 CIDR range and select the peering connection and save on the Primary Route table.
Step-8. Add the Primary IPV4 CIDR range and select the peering connection and save on the Secondary Route table.
Step-9. Now we able to access the Secondary VPC EC2 Instance through the Primary VPC EC2 Instance via Peering connection.
Top comments (0)