AWS Cloud WAN series · Part 6 of 17
AWS Cloud WAN: Hybrid Connectivity with Direct Connect
Sixth in the AWS Cloud WAN series. Hooking the cloud spine to your data centers is the part that bites. Direct Connect can now attach a gateway straight to the core network — but the routing is a BGP exercise, not a Cloud WAN one. Here's how routes flow both ways, why return traffic drifts asymmetric, and the constraints that quietly reshape the design — every claim sourced to AWS docs.
TL;DR
For a new hybrid build, attach a Direct Connect Gateway directly to the core network. It's simpler and cheaper than running a Transit Gateway purely to terminate DX, and it inherits Cloud WAN's policy, tagging, and segmentation. The catch is in the fine print: the gateway binds to one segment, advertisement is BGP-only (no static routes, no DX communities into the core), and you must associate the DXGW in every Region the segment lives in — or return traffic exits through a randomly chosen remote Region. Symmetry is your job, and you do it in BGP, not in the console.
Design it this way
- Greenfield hybrid, no TGW investment → native DXGW attachment.
- Associate the DXGW in every Region the attached segment is present.
- Advertise specific per-location prefixes; one transit VIF primary, one backup, set on-prem with local-pref.
- Pin Region preference (2025.11 routing policies) wherever a stateful firewall sits in the flow.
Don't do this
- Don't point a static route at a DXGW attachment — it's BGP-only.
- Don't rely on DX BGP communities reaching the core — unsupported.
- Don't expect one DXGW to serve multiple segments — it's one segment per gateway.
- Don't leave a Region unassociated and hope the return paths stay symmetric.
Two ways in from the data center — and why the new one is simpler
For most of Cloud WAN's life there was no native Direct Connect support. To bring DX into a Cloud WAN network you stood up an intermediary Transit Gateway per Region as a terminator: the transit VIF landed on the TGW, and the TGW peered with the Core Network Edge. It worked, and it's still a perfectly valid pattern — AWS even recommends a TGW per Region for DX in some multi-Region designs, specifically so each Region's workloads reach the gateway directly without creating cross-Region dependencies. But it means running and paying for TGWs whose only job is to terminate DX.
Since January 14, 2025, there's a cleaner option: the native Direct Connect Gateway attachment. You attach a DXGW directly to the core network — no intermediary TGW — with automatic, bidirectional BGP route propagation between AWS and on-premises over a transit VIF. It inherits the rest of Cloud WAN too: central policy, tag-based attachment automation, and segmentation. For a greenfield hybrid design this is the simpler, cheaper path; for an existing DX-via-TGW deployment it's a migration target (Article 12), not an obligation. Figure 1 contrasts the two.
One cost footnote that trips people up: the Direct Connect gateway object is free — "there are no charges for using a Direct Connect gateway" — but the DXGW attachment to a Cloud WAN core network is billable at the standard per-hour and per-GB rates, on top of DX port-hours and data transfer out. "Free gateway" does not mean free hybrid connectivity.
How routes flow both ways — and the one association rule that sets your paths
The mechanics are worth getting exactly right, because every later design decision falls out of them.
Inbound (on-premises → AWS). Cloud WAN learns the BGP routes your on-prem routers advertise over the transit VIF and DXGW. They land in the segment route tables of the Core Network Edges associated with the attachment, and from there propagate across every Region the segment spans — so an on-prem prefix learned in one Region is reachable from that segment's VPCs everywhere.
Outbound (AWS → on-premises). Cloud WAN propagates the segment's routes to the DXGW, which advertises them over the transit VIFs. Two details do the heavy lifting here: each CNE associated with the DXGW advertises only its local routes toward the gateway, and the AS_PATH attribute is retained in those advertisements. That retained AS_PATH is the lever you pull on-premises to tell which Region a route came from and steer return traffic accordingly.
The single most important design rule drops straight out of this: associate the Direct Connect Gateway with every Cloud WAN Region where the attached segment is present. Miss one, and the CNE in that unassociated Region has no local DXGW attachment, so it forwards on-prem-bound traffic to a remote CNE instead. When several remote CNEs advertise the prefix with equal AS_PATH and MED, the forwarding CNE is chosen at random — AWS's own wording. That random pick is exactly how you end up with asymmetric paths and unpredictable latency. Associate the gateway everywhere the segment lives, and each Region uses its local exit (Figure 2).
Underneath all of this is the same best-path logic Cloud WAN inherits from Transit Gateway, covered in Article 5: the most-specific prefix wins absolutely, then shorter AS_PATH, then lower MED, with a same-Region CNE preferred when AS_PATH lengths are equal. Keep that order in mind — the symmetry work in the next section is mostly about feeding BGP the right prefixes and attributes so its tiebreakers land where you want.
Why return traffic drifts asymmetric — and the BGP tuning that fixes it
Symmetric routing — traffic taking the same path both directions — is non-negotiable when a stateful firewall is in the path, and worth having everywhere for predictability. Asymmetry plus stateful inspection equals dropped traffic, full stop. Cloud WAN gives you sensible defaults, but any multi-path hybrid design needs active BGP tuning on top.
The defaults working for you. Cloud WAN always prefers the local-Region path as long as the learned prefixes have equal AS_PATH length — local-Region preference is the foundation of optimal routing. And because the most-specific prefix wins, advertising specific prefixes from each on-prem location — rather than one summary from everywhere — lets Cloud WAN make the correct per-destination choice.
The tuning you do yourself. On your on-prem routers, set BGP attributes (typically local preference) so that for each location one transit VIF is primary and another is backup — active/passive failover, where a primary VIF failure shifts traffic to the backup automatically. For multiple DXGWs or multiple on-prem locations, lean on the retained AS_PATH plus per-location specific prefixes so the gateway forwards each destination to the right location's primary VIF; where you're forced to advertise the same summary prefix from several locations, you influence Cloud WAN's choice by using multiple Direct Connect Gateways.
The newest lever. With the 2025.11 routing policies (Article 2), you can now set local preference, AS_PATH, and MED inside Cloud WAN to shape inbound and outbound path selection — a capability that used to live only on your on-prem routers. This is the cleanest way to build a deterministic primary/backup multi-path hybrid design. The watchword from AWS's own guidance: when stateful firewalls inspect a flow, weigh Region preferences carefully in your routing policies to keep the flow symmetric.
Where does VPN fit? A Site-to-Site VPN over the internet is the usual backup to DX — cheap insurance for when a circuit or a whole DX location goes dark. One wrinkle to plan around: private-IP VPN and Connect attachments aren't supported when a DXGW attachment is the transport type, so a backup VPN lands as its own Cloud WAN attachment rather than riding the DXGW's transport. Figure 3 shows the primary/backup shape.
What the native attachment won't let you do — the constraints to design around
The native DXGW attachment carries specific limitations. Know them before you commit a design to it — most are BGP-by-design, and one of them routinely reshapes the segment model.
| Constraint | What it means for your design |
|---|---|
| No static routes to a DXGW attachment | You can't point a static route at a DXGW attachment as next hop. Routes must be dynamically advertised from on-prem via BGP — this is BGP-only by design. |
| No DX BGP communities inside Cloud WAN | Direct Connect BGP communities aren't honored on the Cloud WAN side, and the 2025.11 routing-policy launch specifically excludes Direct Connect from community support. If your traffic engineering leans on DX communities propagating into the core, redesign around AS_PATH and prefixes. |
| No outbound allowed-prefix list on the Cloud WAN side | You can't hand Cloud WAN a list of prefixes to advertise out over the DXGW — all of the segment's prefixes go to the gateway (everything-or-nothing). Control it with routing policies or by what's actually in the segment. |
| One segment per DXGW | A Direct Connect Gateway associates with a single Cloud WAN segment. You can associate multiple DXGWs with the same segment, so reaching on-prem from several segments means a DXGW per segment. |
| ASN must differ | The DXGW's ASN must sit outside the core network's configured ASN range — same rule as TGW peering. Plan ASN allocation globally to avoid conflicts. |
| Transport restriction | Private-IP VPN and Connect attachments aren't supported when a DXGW attachment is the transport type. |
The one-segment-per-DXGW limit is the one that most often bends a design. If your hybrid model needs on-prem reachable from both a hybrid segment and, say, a shared-services segment, you either route between those segments with a share (Article 3) or stand up a second DXGW dedicated to the other segment. Decide that before you draw the segment map, not after.
When to attach native, and when to keep DX on a TGW
Native isn't automatically the answer. Here's the practical call.
| Your situation | What I'd do |
|---|---|
| Greenfield hybrid, no existing TGW investment | Native DXGW attachment. Simpler and cheaper — no TGW to run just to terminate DX. |
| Existing DX-via-TGW that works | Leave it, or migrate deliberately (Article 12). The native model is a target, not an obligation. |
| You need a TGW in-Region anyway (regional hub, appliance patterns, TGW-only features) | Keep the TGW, terminate DX there, and peer the TGW to the CNE. AWS still recommends a TGW per Region for DX in some multi-Region designs, to keep each Region's hybrid traffic local and free of cross-Region dependencies. |
| Heavy reliance on DX BGP communities for traffic engineering | Mind the community gap above. A TGW-terminated model may give you more room, or you redesign around AS_PATH and prefixes. |
Plenty of mature networks run both — native DXGW where it's clean, TGW-terminated DX where history or a missing feature requires it. The segmentation model holds either way, which is what makes mixing them safe.
Putting it together — a resilient multi-Region hybrid design
Stack the pieces and a common resilient design emerges (Figure 4): two or more Regions, each with a Core Network Edge; a hybrid segment present in all of them; a Direct Connect Gateway associated with every Region the hybrid segment lives in; two transit VIFs per on-prem location (primary and backup) with local-preference tuning on-prem; specific prefixes advertised per location; and — where stateful inspection is involved — routing policies pinning Region preference for symmetry. Workload VPCs in other segments reach on-prem by sharing their segment with the hybrid segment (Article 3), and each Region exits through its local DXGW association.
The payoff is direct, local-Region egress to on-premises, automatic failover when a VIF or location drops, and symmetric return paths that keep stateful firewalls happy. Nothing here is exotic — it's the same handful of rules applied consistently: associate everywhere, advertise specifics, set primary/backup in BGP, and pin the Region where inspection demands it.
What's next. Hybrid routing pulled multi-Region behavior into view — local-Region preference, cross-Region propagation, the random-remote-CNE failure mode. Article 7 zooms out to multi-Region routing mechanics in their own right: how the full-mesh CNE peering works, how segments propagate globally versus regionally, the "every Region needs an attachment for the destination" principle, and the equal-attribute edge cases (like routes chosen at random) you design around.
Sources
- AWS — Direct Connect gateway attachments in AWS Cloud WAN (about): native DXGW attaches directly to the core network with no intermediary TGW; bidirectional BGP; single segment per DXGW (multiple DXGWs per segment); DXGW ASN must be outside the core ASN range; inbound routes land in associated CNE segment route tables; outbound, each CNE advertises only local routes with AS_PATH retained; associate the DXGW in every Region the segment spans; limitations (no static routes, no DX communities, no outbound allowed-prefix list, private-IP VPN/Connect transport restriction). docs.aws.amazon.com/.../cloudwan-dxattach-about.html
- AWS — Achieve optimal routing with AWS Cloud WAN for multi-Region networks (blog): local-Region preference when AS_PATH lengths are equal; a Region without a local attachment inherits a propagated remote route; when multiple equal-attribute routes exist, the forwarding edge is chosen at random. aws.amazon.com/blogs/.../achieve-optimal-routing-with-aws-cloud-wan-for-multi-region-networks
- AWS — Advanced hybrid routing scenarios with AWS Cloud WAN and AWS Direct Connect (blog): primary/backup transit VIFs via on-prem local preference; per-location specific prefixes and AS_PATH; multiple DXGWs to influence the same summary prefix; weigh Region preferences for symmetry under stateful inspection. aws.amazon.com/blogs/.../advanced-hybrid-routing-scenarios-with-aws-cloud-wan-and-aws-direct-connect
- AWS — Deploying hybrid networks using AWS Cloud WAN and AWS Direct Connect (blog): AWS recommends a Transit Gateway for Direct Connect in each Region in some designs, so workloads reach the DXGW directly without cross-Region dependencies. aws.amazon.com/blogs/.../deploying-hybrid-networks-using-aws-cloud-wan-and-aws-direct-connect
- AWS — AWS Direct Connect User Guide: AWS Cloud WAN (native Direct Connect gateway attachment to a core network, launched January 14, 2025). docs.aws.amazon.com/directconnect/.../direct-connect-cloud-wan.html
- AWS — Cloud WAN routing policies (2025.11): set local preference, AS_PATH, and MED inbound/outbound inside Cloud WAN; BGP community support covers Site-to-Site VPN and Connect only and excludes Direct Connect (and TGW peering). docs.aws.amazon.com/.../cloudwan-routing-policies.html
- AWS — How transit gateways work (route evaluation): most-specific prefix wins; static beats propagated; for equal CIDR + type, shorter AS_PATH then lower MED; same-Region preference. Cloud WAN inherits these semantics (Article 5). docs.aws.amazon.com/vpc/latest/tgw/how-transit-gateways-work.html
- AWS — AWS Cloud WAN pricing: a Direct Connect gateway object is free, but the DXGW attachment to a Cloud WAN core network is billable at the standard per-hour and per-GB rates (plus DX port-hours and data transfer out). aws.amazon.com/cloud-wan/pricing/