DEV Community

Cover image for AWS-VPC (Peering Connections)
Kannan
Kannan

Posted on

AWS-VPC (Peering Connections)

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

Image description

Step-1. As per the above VPC Peering connection architect Create a VPC and subnet and Rout table.

Image description

Image description

Image description

  • Associate the subnet with the route table.

Image description

Step-2. Create the Internet Gateway and attach the VPC.

Image description

  • Edit and add the Internet Gateway in the route table.

Image description

Step-3. Create the EC2 Instance with VPC-A network settings and Publich IP enabled on the Subnet and Instance.

Image description

Step-4. As the above steps we have created another VPC, Subnet and Route table.

Image description

Image description

Image description

  • Associate the Subnet on the route table and create EC2 Instance.

Image description

Image description

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.

Image description

  • Accept the Peer Request.

Image description

Step-7. Add the Secondary IPV4 CIDR range and select the peering connection and save on the Primary Route table.

Image description
Step-8. Add the Primary IPV4 CIDR range and select the peering connection and save on the Secondary Route table.

Image description

Step-9. Now we able to access the Secondary VPC EC2 Instance through the Primary VPC EC2 Instance via Peering connection.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up