概念 · CLF-C02 の発展
VPC peering
A private link between two VPCs. It is one to one and never transitive.
このレッスンはまだ翻訳されていないため、英語で表示しています。
クラウドプラクティショナーで学んだこと
- 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.
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
| Compare | Peering | Transit Gateway | PrivateLink |
|---|---|---|---|
| Joins | Two VPCs | Many VPCs, VPN, Direct Connect | One service, one way |
| Overlapping ranges | Not allowed | Not allowed | Allowed |
| Transitive | No | Yes | Not applicable |
| Cost | No hourly fee | Per attachment and per GB | Per endpoint and per GB |
| Pick it for | A few VPCs, lowest cost | Hub for many networks | Sharing one service |
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
| Compare | Peering | Transit Gateway | PrivateLink |
|---|---|---|---|
| Joins | Two VPCs | Many VPCs, VPN, Direct Connect | One service, one way |
| Overlapping ranges | Not allowed | Not allowed | 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
| Compare | Peering | Transit Gateway | PrivateLink |
|---|---|---|---|
| Transitive | No | Yes | Not applicable |
| Cost | No hourly fee | Per attachment and per GB | Per endpoint and per GB |
| Pick it for | A few VPCs, lowest cost | Hub for many networks | Sharing one service |
概要
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.
概要
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.
覚えること
- 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.
試験では
- “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.
混同しやすいもの
AWS Transit GatewayA regional hub that joins many VPCs, VPNs and Direct Connect links, with routing you control.
AWS PrivateLinkExpose one service to other VPCs and accounts privately, with no routing between the networks.
- VPC endpointsPrivate access to AWS services with no NAT gateway: gateway endpoints and interface endpoints.