A deep dive into VPC Peering - Practical ver.
Reference: aws docs
- A feature that connects two different VPCs
- Once two VPCs are connected, a pathway for internal communication is created!
- Peering can also be configured across
different accounts/different regions- Benefits of setting up peering connections between different regions
- DR (Disaster Recovery) configuration becomes possible
- You can peer multiple regions and use them
- e.g.) Accessing a Thailand service from within the country
- Benefits of setting up peering connections between different regions
Requester VPC&Accepter VPC- Although the names are requester and accepter, they do not indicate direction!
- Direction can be configured differently based on subnet communication
- Although the names are requester and accepter, they do not indicate direction!
- Sending VPC's CIDR Block >= Receiving VPC's CIDR Block
- Why?
- If the receiving VPC's CIDR Block is larger than the sending VPC's CIDR Block, communication obviously won't work!
- Typically, the CIDR Blocks of both VPCs are set to be the same, but the receiving VPC's can be smaller
- Being smaller is not a problem
- Why?
-
When configuring a
Peering Connection, theCIDR Blocksof the two VPCs must not conflict- Why?
- Since the two VPCs are being connected rather than existing separately, they cannot have conflicting CIDRs
- Why?
-
Additional charges apply when traffic passes through the peering connection
- However, it's not a significant amount!