Geek Culture
Published in

Geek Culture

VPC Connection — Same Region

Photo by Thomas Jensen on Unsplash

Often times, one logical group of virtual network (VPC) in AWS would want to interact with the other. AWS has provided options to connect between VPCs of the same region and also different regions.

VPC Peering is a networking connection provided by AWS to connect two VPCs. The VPCs can be from the same or different accounts. Since VPC is a region based entity, VPC Peering can also be established between VPCs from different regions in the same account. Once the peering is established, the instances in either of the VPCs can connect with each other as if they are in the same account.

To create a Peering Connection, go to VPC dashboard and click on Create Peering Connection. The wizard looks like as below. We need to provide the local VPC which we are interested to peer with and its CIDR block. If we are connecting to the same region in the same account, then we can select My Account and This region and provide the VPC and its CIDR to be connected to.

Create Peering Connection — AWS Console

After creating, the peering connection looks like below, and shows the peering connection status as Active.

Peering Connection Config

The next step after creating the VPC peering connection is to update the route table of the subnets in both the VPCs.

Peering Connection — Route Table

VPC peering is a one-to-one connection between VPCs. So, to connect to another VPC, another peering connection has to be created and the route tables to be updated.

Peering Connection -Multiple VPCs

If VPC A has a connection with VPC B and VPC C, this does not mean that a peering connection is automatically available between VPC B and VPC C. Another peering connection has to be created to establish this relationship.

VPC Peering — No Automatic Connection

Things to know

  • VPC Peering allows to reference security groups from the peer VPC in the same region.
  • Supports DNS hostname resolution to return private IP address.
  • Supports peering of both IPv4 and IPv6 addresses.
  • The VPCs cannot have overlapping IP addresses.
  • No redundant Peering connection can be made between the same VPCs. Only one peering connection is supported.

Can you answer the following questions?

  1. Can NACL be accessed among VPCs?
  2. How to health check the VPC Peering Connection?

Originally published at https://www.pradheepa.com.

--

--

--

A new tech publication by Start it up (https://medium.com/swlh).

Recommended from Medium

OpenKeyS — HackTheBox

Doctor — HackTheBox

{UPDATE} DOLE PLANTATION Hack Free Resources Generator

Black Hat 2018 Recap: Striking Gold in the Mojave Desert

{UPDATE} 飞刀大神 Hack Free Resources Generator

1Blocker 4.0: Now with In-App Tracker Blocking

The Formation of the MetaAlliance

Welcoming XATA, the first project selected into the Polygon Track

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pradheepa P

Pradheepa P

Backend Engineer, Cloud Practitioner

More from Medium

AWS Monitoring Walkthroughs: Config vs CloudTrail vs CloudWatch

Why do we need to move our web apps & apps to the cloud?

A Practical Guide to Make DevSecOps an Automated Reality

Connecting Robo 3T with DocumentDB outside AWS VPC.