ladderlore
Request a guide
  • Type a service name, like S3 or IAM.

Concept · Builds on CLF-C02

VPC peering

A private link between two VPCs. It is one to one and never transitive.

You know from Cloud Practitioner

  • Peering connects two VPCs so they talk over the AWS network.
  • It is not transitive: if A peers with B and B with C, A cannot reach C.
Read the Cloud Practitioner lesson
VPC A
VPC B
VPC C
A cannot reach C
peeringpeering
Peering does not pass traffic on to a third VPC.
  • Joins

    Peering
    Two VPCs
    Transit Gateway
    Many VPCs, VPN, Direct Connect
    PrivateLink
    One service, one way
  • Overlapping ranges

    Peering
    Not allowed
    Transit Gateway
    Not allowed
    PrivateLink
    Allowed
  • Transitive

    Peering
    No
    Transit Gateway
    Yes
    PrivateLink
    Not applicable
  • Cost

    Peering
    No hourly fee
    Transit Gateway
    Per attachment and per GB
    PrivateLink
    Per endpoint and per GB
  • Pick it for

    Peering
    A few VPCs, lowest cost
    Transit Gateway
    Hub for many networks
    PrivateLink
    Sharing one service
Three ways to connect VPCs.

1 / 2

  • Joins

    Peering
    Two VPCs
    Transit Gateway
    Many VPCs, VPN, Direct Connect
    PrivateLink
    One service, one way
  • Overlapping ranges

    Peering
    Not allowed
    Transit Gateway
    Not allowed
    PrivateLink
    Allowed

2 / 2

  • Transitive

    Peering
    No
    Transit Gateway
    Yes
    PrivateLink
    Not applicable
  • Cost

    Peering
    No hourly fee
    Transit Gateway
    Per attachment and per GB
    PrivateLink
    Per endpoint and per GB
  • Pick it for

    Peering
    A few VPCs, lowest cost
    Transit Gateway
    Hub for many networks
    PrivateLink
    Sharing one service
Three ways to connect VPCs.

What it is

A peering connection joins two VPCs in the same Region, in different Regions, or in different accounts. The ranges must not overlap. Peering does nothing until both sides add a route to the other VPC’s range, and the security groups allow the traffic. Traffic never goes over the internet, and cross-Region traffic is encrypted.

What it is

Peering has no hourly charge, which makes it the cheapest way to join a few VPCs. But it does not scale. Every pair needs its own connection, so ten VPCs that all talk to each other need 45. Peering also does not pass through a VPC to reach a VPN, a Direct Connect link or the internet. For many VPCs use Transit Gateway. To share one service without exposing the whole network, use PrivateLink.

Remember

  • One to one, not transitive. No overlapping ranges.
  • Needs a route and security group rules on both sides.
  • Works across accounts and Regions.
  • No hourly fee. Data transfer is charged across Availability Zones and Regions.
  • n VPCs in a full mesh need n(n-1)/2 connections.

On the exam

  • “Connect two VPCs at the lowest cost” points to VPC peering.
  • “Connect hundreds of VPCs and on-premises networks” points to Transit Gateway.
  • “Expose one application to other VPCs with overlapping ranges” points to PrivateLink.