teluzia.Cloud Engineer · Day 47
CHAPTER 07 · AWS VPC AND NETWORKING

VPC peering and endpoints

4–5 hours including independent practice3 topics
LET’S MAKE THIS SIMPLE

What you’re learning today

Choose private connectivity according to the destination. VPC peering joins nonoverlapping network address spaces directly, while VPC endpoints connect to supported services. You will compare their routing and authorization requirements and identify why a third VPC cannot automatically transit through a peer. VPC peering supports private routing between two VPCs with compatible nonoverlapping address spaces. Both sides need appropriate routes and security configuration. Peering is not transitive: A connected to B and B connected to C does not automatically connect A to C. DNS behavior also needs deliberate configuration. Gateway endpoints for supported services such as S3 and DynamoDB integrate with route tables. Interface endpoints use private network interfaces and private addresses for supported services through AWS PrivateLink, with security groups and DNS considerations. They are not interchangeable, and pricing and availability depend on endpoint type and service.

Think of it this way

Peering is a direct bridge between campuses; an endpoint is a dedicated service entrance rather than a bridge to every other campus.

TOPIC 01 / 03Step by step

Peering and nontransitive routing

VPC peering supports private routing between two VPCs with compatible nonoverlapping address spaces. Both sides need appropriate routes and security configuration. Peering is not transitive: A connected to B and B connected to C does not automatically connect A to C. DNS behavior also needs deliberate configuration. For A=10.20.0.0/16 and B=10.30.0.0/16, each route table needs the remote prefix via the peering connection; a security policy still must allow the intended application flow after the routes exist. Direct-peer reasoning prevents assuming routing is automatic and helps distinguish absent routes or security permissions from unsupported transit behavior in an architecture with several networks connected for different purposes. Using B as an automatic router from A to C through separate peering connections is unsupported transit; add an appropriate direct connection or a deliberate transit architecture rather than broadening security rules.

WORKED EXAMPLE
For A=10.20.0.0/16 and B=10.30.0.0/16, each route table needs the remote prefix via the peering connection; a security policy still must allow the intended application flow after the routes exist.
Why this matters

Direct-peer reasoning prevents assuming routing is automatic and helps distinguish absent routes or security permissions from unsupported transit behavior in an architecture with several networks connected for different purposes.

A common trap

Using B as an automatic router from A to C through separate peering connections is unsupported transit; add an appropriate direct connection or a deliberate transit architecture rather than broadening security rules.

Read all topics in this lesson

A complete reference to revisit alongside the guided steps above.

Peering and nontransitive routing

VPC peering supports private routing between two VPCs with compatible nonoverlapping address spaces. Both sides need appropriate routes and security configuration. Peering is not transitive: A connected to B and B connected to C does not automatically connect A to C. DNS behavior also needs deliberate configuration. For A=10.20.0.0/16 and B=10.30.0.0/16, each route table needs the remote prefix via the peering connection; a security policy still must allow the intended application flow after the routes exist. Direct-peer reasoning prevents assuming routing is automatic and helps distinguish absent routes or security permissions from unsupported transit behavior in an architecture with several networks connected for different purposes. Using B as an automatic router from A to C through separate peering connections is unsupported transit; add an appropriate direct connection or a deliberate transit architecture rather than broadening security rules.

WORKED EXAMPLE
For A=10.20.0.0/16 and B=10.30.0.0/16, each route table needs the remote prefix via the peering connection; a security policy still must allow the intended application flow after the routes exist.

Why this matters

Direct-peer reasoning prevents assuming routing is automatic and helps distinguish absent routes or security permissions from unsupported transit behavior in an architecture with several networks connected for different purposes.

A common trap

Using B as an automatic router from A to C through separate peering connections is unsupported transit; add an appropriate direct connection or a deliberate transit architecture rather than broadening security rules.

Gateway and interface endpoints

Gateway endpoints for supported services such as S3 and DynamoDB integrate with route tables. Interface endpoints use private network interfaces and private addresses for supported services through AWS PrivateLink, with security groups and DNS considerations. They are not interchangeable, and pricing and availability depend on endpoint type and service. An S3 gateway endpoint adds service-prefix routing to associated tables; an interface endpoint for an appropriate service creates endpoint interfaces and can use private DNS so the familiar service name resolves to the private access path. Endpoint-type distinctions keep routing, DNS and cost plans correct and reveal whether a workload can reach a service without general NAT egress under the actual endpoint support available for that service and Region. Assuming every endpoint is free or route-table-only ignores interface endpoint interfaces, hourly/data pricing and security groups; identify the exact endpoint type and service before estimating cost or writing access rules.

WORKED EXAMPLE
An S3 gateway endpoint adds service-prefix routing to associated tables; an interface endpoint for an appropriate service creates endpoint interfaces and can use private DNS so the familiar service name resolves to the private access path.

Why this matters

Endpoint-type distinctions keep routing, DNS and cost plans correct and reveal whether a workload can reach a service without general NAT egress under the actual endpoint support available for that service and Region.

A common trap

Assuming every endpoint is free or route-table-only ignores interface endpoint interfaces, hourly/data pricing and security groups; identify the exact endpoint type and service before estimating cost or writing access rules.

Endpoint policies and IAM

A private service path does not grant application permissions. Endpoint policies can restrict usage, while IAM, resource policies and encryption permissions still participate in authorization. Network reachability and authorization are separate checks. Private DNS must resolve to the intended path for clients that use a standard service hostname. An app can reach S3 through an endpoint yet receive AccessDenied because its role lacks GetObject or a bucket policy denies the request; endpoint availability does not make objects readable by every principal in the VPC. Layered access review prevents private-network placement from being mistaken for authorization and makes access-denied diagnosis focus on principal, action, resource and policy context after connectivity has been established. Treating an endpoint as a universal permission grant weakens reasoning and can prompt broad IAM changes; verify network path and policy evaluation independently before choosing any narrowly scoped repair.

WORKED EXAMPLE
An app can reach S3 through an endpoint yet receive AccessDenied because its role lacks GetObject or a bucket policy denies the request; endpoint availability does not make objects readable by every principal in the VPC.

Why this matters

Layered access review prevents private-network placement from being mistaken for authorization and makes access-denied diagnosis focus on principal, action, resource and policy context after connectivity has been established.

A common trap

Treating an endpoint as a universal permission grant weakens reasoning and can prompt broad IAM changes; verify network path and policy evaluation independently before choosing any narrowly scoped repair.

KEEP THESE WITH YOU

Today’s takeaways

Configure both peer directions.

Choose the exact endpoint model.

Keep network and IAM checks separate.

CLOSE THE LOOP

Ready to complete this day?

Verify the practical steps and pass the knowledge check (at least two thirds correct).

Lab steps verifiedKnowledge check passed