Skip to content

Primary SAA curriculum

Hybrid Network Connectivity To AWS

Hybrid connectivity progressively by separating the physical path, routing, Transit Gateway segmentation, DNS forwarding, security inspection, and failure recovery.

16 min read

After this, you will understand

This scenario makes hybrid networking easier by splitting one intimidating diagram into five jobs: create a path, advertise routes, segment reachability, resolve names, and survive path failure.

Article guideprerequisites, mental models, and concepts

Article overview

intermediateCloudCertificationNetworking

Three useful mental models

In plain terms

VPN or Direct Connect provides the hybrid path, Transit Gateway connects many networks, route tables decide reachability, and Route 53 Resolver connects the two DNS worlds.

Decision pressure

Teams treat a connection as a complete network, overlook return routes and overlapping CIDRs, or allow every attached network to reach every other network.

Exam-ready model

Plan addresses first, choose the path from the requirement, centralize transit only when scale needs it, make routing and DNS bidirectional, and test redundant paths.

Think before reading

What is the simplest Transit Gateway mental model?

It is a Regional routing hub: networks attach to it, and its route tables decide which attachment receives each destination.

Connected learning

These lessons add useful context to the current core lesson.
  1. 1Multi-Account Cost GovernanceAWS Scenario

Concepts Covered

  • Connectivity versus routing, DNS, and authorization
  • Non-overlapping address planning
  • Site-to-Site VPN and its two IPsec tunnels
  • Direct Connect private dedicated connectivity
  • Direct Connect encryption boundaries
  • Transit Gateway hub-and-spoke design
  • VPC, VPN, and Direct Connect-related attachments
  • Transit Gateway route-table association and propagation
  • Static routes and BGP-learned routes
  • Route 53 Resolver inbound and outbound endpoints
  • Production, development, shared-service, and inspection segmentation
  • Return paths and symmetric routing
  • Hybrid monitoring, redundancy, performance, and cost
  • AWS Solutions Architect Associate exam (SAA-C03) hybrid-network recognition patterns

1. Situation

A company has three AWS Virtual Private Clouds (VPCs)—logically isolated networks inside AWS—and one data center:

  • a production VPC;
  • a development VPC;
  • a shared-services VPC containing directory and management systems; and
  • on-premises databases that will remain during a phased migration.

Production must reach selected on-premises services. Developers need shared services but must not reach production databases. On-premises users need private AWS DNS names to resolve. The network must survive a path failure.

Beginners often hear “connect the data center to AWS” as one problem. It is at least five:

physical path -> routing -> segmentation -> DNS -> failure recovery
  • Connectivity provides a path for packets.
  • Routing tells packets where to go and how to return.
  • Segmentation decides which networks may have a route to which destinations.
  • DNS translates names across the AWS and on-premises environments.
  • Security controls decide whether reachable traffic is actually allowed.

2. Naive Design

Naive option 1: connect everything to everything

Point-to-point connectivity grows into an operational mesh, while VPC peering still provides no transitive routing.

As VPC count grows, point-to-point connections, routes, owners, and failure paths multiply. VPC peering is not transitive, so VPC A cannot automatically act as a routing bridge between B and C.

Naive option 2: “The VPN is up, so networking is done”

The tunnel is established, but the VPC route table lacks the on-premises CIDR range, the numeric block of IP addresses assigned to that network. The data-center router may also lack the VPC's CIDR route, or a security group may block the port. Tunnel health proves only part of the path.

Naive option 3: reuse the same CIDR everywhere

The data center and a VPC both use 10.20.0.0/16. A router cannot choose which identical destination is intended without address translation or redesign.

Naive option 4: allow every attached network to communicate

A central hub simplifies connectivity, but one broad route table turns development, production, and partners into one large trust zone.

3. What Breaks

Follow one request from an EC2 instance to an on-premises database:

  1. The instance sends a packet to the database IP.
  2. Its subnet route table has no matching on-premises route, so the packet never reaches the hybrid connection.
  3. After that route is added, Transit Gateway sends the packet to the wrong attachment because its route table is misassociated.
  4. After the forward path is fixed, the data-center router does not know the VPC CIDR, so the response cannot return.
  5. After routing works, the application uses db.corp.internal, but AWS DNS has no forwarding rule for that domain.
  6. After DNS works, the database firewall still denies the VPC source range.

This explains an essential networking principle:

A working path requires forward routing, return routing, name resolution when names are used, and permission at every control point.

4. AWS Architecture

Build the network from the smallest requirement.

Step 1: plan non-overlapping addresses

Before connections exist, allocate CIDRs centrally:

on premises       10.0.0.0/12
production VPC    10.32.0.0/16
development VPC   10.33.0.0/16
shared VPC        10.34.0.0/16

The exact ranges are examples. The rule is that networks that must route directly should not overlap.

When overlap already exists, options such as renumbering, NAT, proxies, or service-specific private access can help, but they add operational complexity. Address planning is cheaper than repairing collision later.

Step 2: connect one VPC quickly with Site-to-Site VPN

For a first hybrid path, use an AWS Site-to-Site VPN:

A VPN connection includes two AWS tunnel endpoints; resilience exists only when the customer configures and can use both paths.

The customer gateway device is the physical or software router on the company side. The AWS customer gateway resource describes it. The AWS-side target can be a virtual private gateway for one VPC or a Transit Gateway for a hub design.

Each Site-to-Site VPN connection includes two tunnels with different AWS endpoints. Configure both; a second tunnel that the customer router ignores is not useful redundancy.

VPN is the usual signal when the requirement emphasizes:

  • encrypted IPsec connectivity;
  • internet transport;
  • relatively fast setup; or
  • a temporary or backup hybrid path.

Step 3: choose Direct Connect for a sustained private path

If the company needs more predictable network behavior, high sustained throughput, or private dedicated connectivity, add AWS Direct Connect:

Direct Connect supplies a sustained private path; encryption remains a separate design decision.

Direct Connect establishes private connectivity from the customer environment to AWS through a Direct Connect location. It takes planning and often provider coordination, so it is not usually the fastest emergency setup.

Private does not mean encrypted by default. Direct Connect traffic is not encrypted in transit by the service automatically. Use TLS at the application layer, an IPsec VPN over Direct Connect, or supported MACsec link-layer encryption when the connection type and encryption requirement call for it.

VPN and Direct Connect are not mutually exclusive. A common pattern uses Direct Connect as the primary path and VPN as backup, subject to tested routing preference and capacity.

Step 4: add Transit Gateway when the connection count grows

Three VPCs and the data center need a hub:

Transit Gateway centralizes transitive routing for many attachments without automatically granting reachability between them.

Each connected network uses an attachment. Transit Gateway supports attachment types such as VPC and VPN. To use Direct Connect with the hub, a transit virtual interface connects the Direct Connect connection to a Direct Connect gateway, and that gateway is associated with Transit Gateway so the attached VPCs and the on-premises network can exchange routes.

Transit Gateway is a managed Regional transit hub. It replaces a large peering mesh, but it does not automatically authorize all traffic and it does not remove VPC route tables.

For only two VPCs that need direct private connectivity, VPC peering may be simpler and cheaper. Transit Gateway becomes valuable when centralized, transitive routing and segmentation justify the hub.

Step 5: understand the two routing decisions

An EC2 packet crosses two main routing layers:

The forward path has two AWS routing decisions, and the conversation succeeds only when the return path is valid too.
  1. The VPC subnet route table selects the Transit Gateway attachment.
  2. The Transit Gateway route table selects the next attachment.

The return path needs corresponding routes in the data center and AWS.

Routes can be configured statically or learned dynamically. BGP (Border Gateway Protocol) exchanges route information between network devices. BGP can adapt to path changes, but it does not replace security policy or prove the application endpoint is healthy.

Step 6: segment with Transit Gateway route tables

An attachment is associated with one Transit Gateway route table for routing traffic arriving from that attachment. Routes from attachments can be propagated into selected route tables, or routes can be configured deliberately.

Use that control to create different routing domains:

Association chooses the routing domain; propagation supplies selected destinations, so missing routes become an intentional segmentation control.
  • Association answers: “Which TGW route table evaluates traffic arriving from this attachment?”
  • Propagation answers: “Which route tables learn routes for destinations behind this attachment?”

Routing segmentation removes paths that should not exist. Security groups, NACLs, host firewalls, and application authentication still enforce access along paths that do exist.

Step 7: connect the two DNS worlds

Private connectivity by IP does not automatically make private names resolvable. A Route 53 private hosted zone is a DNS namespace visible to associated VPCs; on-premises DNS cannot query it until the two DNS systems are connected deliberately.

Resolver endpoint names follow query direction relative to AWS: inbound enters AWS DNS; outbound leaves toward external DNS.
  • An inbound Resolver endpoint receives DNS queries coming from on premises into the VPC Resolver.
  • An outbound Resolver endpoint sends selected VPC DNS queries to on-premises DNS servers according to forwarding rules.

The endpoint names describe query direction relative to AWS. Use endpoints across multiple Availability Zones and ensure routes, security groups, and on-premises firewalls allow the DNS traffic.

Step 8: add centralized inspection only when required

If policy requires inter-VPC or hybrid traffic inspection, route selected traffic through an inspection VPC with AWS Network Firewall or supported appliances.

Stateful inspection requires a symmetric path in both directions; a firewall beside the route is not enough.

Stateful firewalls expect a consistent path. Design symmetric routing so both directions of a flow traverse the correct inspection endpoint. Central inspection adds hops, cost, route complexity, and another failure domain; it is a policy decision, not a decoration.

Step 9: remove single-path dependencies

For production hybrid connectivity:

  • configure both tunnels of each VPN connection;
  • use redundant customer gateway devices where required;
  • consider multiple VPN connections for device/site resilience;
  • design Direct Connect redundancy across connections and locations according to the availability requirement;
  • provide a tested backup path with enough capacity; and
  • verify routing preference and convergence during failure.

Redundant diagrams are not enough. Failure exercises must show that traffic actually moves and returns.

Completed architecture

The complete design separates connection, routing, DNS, inspection, authorization, and backup capacity instead of treating them as one networking control.

5. Request Or Data Flow

Learn three flows.

Flow 1: production EC2 reaches an on-premises database

  1. The application resolves the database name through an outbound Resolver rule if it uses corporate DNS.
  2. The EC2 instance sends the packet to the resolved on-premises address.
  3. The subnet route table targets Transit Gateway for that CIDR.
  4. The production-associated TGW route table selects the hybrid attachment.
  5. BGP-learned or static routing sends the packet across Direct Connect or VPN.
  6. On-premises routing delivers it to the database.
  7. Firewalls and the database authorize the connection.
  8. The response follows a valid return route to the production VPC.

Flow 2: on-premises user resolves an AWS private name

  1. The user's query reaches corporate DNS.
  2. A conditional forwarder recognizes the AWS private domain.
  3. It sends the query over hybrid connectivity to the Resolver inbound endpoint.
  4. The VPC Resolver evaluates the private hosted zone and returns the answer.
  5. The client then needs a valid network route and permission to reach that address.

DNS resolution proves a name maps to an address; it does not create network reachability.

Flow 3: Direct Connect becomes unavailable

  1. Monitoring detects the path or BGP session failure.
  2. The router withdraws or stops preferring the Direct Connect routes according to design.
  3. Routes converge toward the VPN backup.
  4. Both VPN tunnels and the customer device must be configured and healthy.
  5. Monitoring checks packet loss, latency, application errors, and backup-path saturation.

If the VPN cannot carry essential production traffic, it is a diagram backup rather than a recovery path.

6. Security Controls

Minimize routes before filtering packets

Do not propagate every route everywhere. Remove unnecessary reachability through TGW route-table segmentation, then use security groups, network ACLs (subnet-level packet rules), Network Firewall, host controls, and application authentication for the permitted paths.

Protect routing and DNS administration

Routes, BGP configuration, Resolver rules, and shared attachments can change a large blast radius. Use least privilege, change review, CloudTrail, AWS Config where suitable, and clear ownership.

Match encryption to the path

Site-to-Site VPN supplies IPsec encryption. Direct Connect supplies private connectivity but not default in-transit encryption. Apply TLS, VPN over Direct Connect, or supported MACsec from the actual data classification and compliance requirement.

Log useful evidence

Use VPC Flow Logs, Network Firewall or appliance logs, VPN and Direct Connect metrics, DNS query logging where appropriate, and configuration-change auditing. Flow Logs show accepted or rejected network-flow metadata; they do not replace application logs or packet payload inspection.

7. Resilience Controls

Monitor:

  • VPN tunnel state and bytes;
  • Direct Connect connection and virtual-interface state;
  • BGP session state and route changes;
  • Transit Gateway attachment health and route-table changes;
  • packet loss, latency, and throughput on each path;
  • Resolver endpoint health and DNS query failures;
  • firewall endpoint health and dropped flows; and
  • application success across the hybrid dependency.

Build redundancy at both ends. Two AWS VPN tunnels can still share one failed customer router. Two Direct Connect links can still share one building or provider path.

Test maintenance and unplanned failure scenarios. Record convergence time and confirm that existing sessions, DNS, stateful firewalls, and application retries behave acceptably.

8. Performance Controls

VPN performance depends on tunnel configuration, customer device capacity, encryption, packet size, internet conditions, and AWS service limits. Direct Connect provides more predictable private connectivity, but the complete path still includes customer and provider infrastructure.

Avoid unnecessary hairpinning. Sending a packet through Transit Gateway, a centralized firewall, an on-premises appliance, and back to AWS can add latency and multiple data-processing charges.

Stateful inspection needs symmetric routing. Asymmetric return paths can make a healthy network look like an intermittent application failure.

DNS latency is application latency when every connection waits for hybrid forwarding. Make Resolver endpoints resilient and monitor the on-premises DNS servers they depend on.

Use service-specific VPC endpoints when AWS service traffic can remain inside AWS instead of traversing NAT or on-premises paths unnecessarily.

9. Cost Controls

ComponentCommon cost shapeDesign question
Transit GatewayAttachment hours and data processingDoes this scale justify a hub?
Site-to-Site VPNConnection hours, data transfer, optional accelerationIs it temporary, primary, or backup?
Direct ConnectPort hours, data transfer, and provider/colocation chargesIs sustained usage worth the dedicated path?
Resolver endpointsEndpoint-hour and query-related costCan endpoints and rules be shared safely?
Network FirewallEndpoint hours and processed trafficWhich flows truly require inspection?
Cross-AZ / hairpin pathsService-specific transfer and processingCan the path be shorter without weakening policy?

VPC peering may be simpler for a small number of VPCs. Transit Gateway reduces operational mesh complexity but adds its own charges.

Use detailed cost and usage data to find Transit Gateway processing, NAT, firewall, Direct Connect, and regional data-transfer surprises. Architecture diagrams should show cost-bearing hops, not only logical trust zones.

10. Exam Variants

Exam wordingFirst thoughtWhy
“Encrypted connection over the public internet”Site-to-Site VPNIPsec hybrid tunnels
“Fastest hybrid setup”Site-to-Site VPNDoes not wait for a dedicated circuit
“Dedicated private connection with predictable throughput”Direct ConnectPrivate dedicated path through a DX location
“Encrypt traffic over Direct Connect”TLS, VPN over DX, or supported MACsecDX is not encrypted by default
“Connect many VPCs and on-premises networks transitively”Transit GatewayHub-and-spoke routing
“Only two VPCs need simple private connectivity”VPC peeringSimpler direct path; no transitive routing
“Isolate development from production at the network hub”Separate TGW route tablesControls route visibility by attachment
“AWS resolves corporate private domains”Resolver outbound endpoint + forwarding ruleQueries leave AWS toward corporate DNS
“On premises resolves AWS private hosted zones”Resolver inbound endpointQueries enter AWS Resolver
“Routes change dynamically when a path fails”BGPExchanges and withdraws reachable prefixes

11. Common Traps

  • Do not treat connectivity, routing, DNS, and authorization as the same control.
  • Do not use VPC peering as a transitive enterprise hub.
  • Do not attach every network to one TGW route table without considering segmentation.
  • Do not forget the return route.
  • Do not design direct routing between overlapping CIDRs and expect longest-prefix rules to identify intent.
  • Do not configure only one VPN tunnel.
  • Do not mistake two AWS tunnels for two customer devices or sites.
  • Do not say Direct Connect encrypts traffic by default.
  • Do not reverse Resolver endpoint direction: inbound means queries enter AWS; outbound means queries leave toward another DNS system.
  • Do not route stateful inspection asymmetrically.
  • Do not assume a backup path has enough capacity without testing it.

Final Mental Model: One-Minute Review

TermExact job in this architectureMemory cue
Site-to-Site VPNCreates encrypted IPsec tunnels over an internet-based or supported private pathSecure temporary road
Direct ConnectProvides private dedicated hybrid connectivityReserved private road
Transit GatewayRoutes among many attached VPC and hybrid networksCentral interchange
AttachmentConnects a network to Transit GatewayRoad entering the interchange
VPC route tableSends subnet traffic toward TGW or another VPC targetLocal road sign
TGW route tableChooses the destination attachmentInterchange sign
BGPExchanges reachable network prefixes and path changesRouters sharing maps
Inbound Resolver endpointReceives DNS queries into AWSAWS information entrance
Outbound Resolver endpointForwards selected AWS queries to external DNSAWS information exit
SegmentationPrevents unnecessary paths between trust zonesClosed roads
Symmetric routingKeeps both flow directions on the expected stateful pathSame checkpoint both ways
A hybrid conversation works only when the path, routing decisions, name resolution, authorization, and return path all agree.

If you remember only one sentence, remember this:

The connection provides a path; route tables choose the destination; DNS finds the address; security decides whether the conversation is allowed.

Deepen the individual mechanics with AWS Transit Gateway, AWS Direct Connect, AWS Site-to-Site VPN, VPC Networking Model, Route 53 Resolver Private DNS Patterns, and AWS Network Firewall.

Official AWS references:

Finished reading?

Your reading history is saved in this browser so you can continue later.

Recommended Next

Multi-Account Cost GovernanceAWS Architecture Scenarios16 min read

This applies the foundation mental models to a real architecture decision instead of a service inventory.

Optional exploration

These links add context, but they do not replace the recommended next lesson.

Arcflow Plus is coming — review drills, research breakdowns, more AI. Get one email at launch.