Networking project: AWS VPC peering connection

Another AWS networking project for your amusement. Connecting two EC2 instances that are located in different regions WITHOUT using the public internet.

VPC peering is used to connect to EC2-B-private from EC2-A-private. VPC peering uses the AWS backbone network so traffic does not traverse the public internet; both EC2 instances have private IPs.

A route table connects the destination 0.0.0.0/0 to the internet gateway for the public subnet in VPC A in region us-east-1. In the public subnet in VPC A, there is an EC2 instance that can be accessed via SSH. Using the EC2 instance in the public subnet, the EC2 instance in the private subnet in VPC A can be accessed. From there the EC2 instance in the private subnet in VPC B in region eu-central-1 in can be accessed.

Routes to the VPC peering connection also have to be created for the private subnets in VPC A and B.

The security groups of EC2-A-private and EC2-B-private need to have rules that allow SSH traffic from the relevant security groups and CIDR ranges, respectively.

This type of infrastructure is a variant of a bare bones example of project containing a website (which runs on the EC2 instance in the public subnet) and a database (which runs on the EC2 instance in the private subnet).

Lader Bezig met laden…
EAD logo Duurt het te lang?

Opnieuw laden Laad het document opnieuw
| Open Openen in nieuwe tab

Leave Comment