Lesson 2 of 10 Advanced Networking

Building a Global Network with AWS Cloud WAN

This lesson explains how AWS Cloud WAN builds a global core network from a single declarative policy, so segmentation and routing are defined once and applied in every Region.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe the elements of a core network policy.
  • Choose between Transit Gateway and Cloud WAN.
  • Explain how versioned policy changes operate the network.

The core network and its policy

Cloud WAN builds a global core network from a central JSON network policy, replacing manually managed TGW peering meshes.

The policy is built from four elements. Core network edges are the Regions where the network has a presence, each with its autonomous system number (ASN). Segments are isolated routing domains, such as prod, dev and shared, that span every Region, so a production VPC in one Region can reach production in another but not development. Attachment policies place VPCs and sites into segments automatically according to their tags, optionally after approval, so a new VPC tagged prod joins the right segment with no manual routing. Segment actions share routes between segments and insert services, sending traffic between segments through inspection. The following table summarises the elements.

Policy elementDefines
Core network edgesThe Regions in which the network has a presence, with their ASNs
SegmentsIsolated routing domains, such as prod, dev and shared, that span all Regions
Attachment policiesAutomatic placement of VPCs and sites into segments by tag, with optional approval
Segment actionsRoute sharing between segments and service insertion that sends traffic through inspection

How it compares with Transit Gateway

Transit Gateway and Cloud WAN both connect many networks, but at different scales. A transit gateway is a Regional hub. Joining Regions requires peering between gateways with static routes, each gateway has its own route tables, and attachments are associated with route tables manually. That is manageable for a few Regions but laborious for many. Cloud WAN is global by design: routing between Regions is dynamic and managed by the service, the whole network is defined by one versioned policy, and attachments join segments automatically by tag. The following table summarises the comparison.

Transit Gateway
ScopeOne Region; peering joins Regions
Routing between RegionsStatic routes on peerings
ConfigurationRoute tables per gateway
Segment membershipManual associations
Cloud WAN
ScopeGlobal by design
Routing between RegionsDynamic, managed by the service
ConfigurationOne versioned policy for the whole network
Segment membershipAttachment policies based on tags

Existing transit gateways can be peered with a Cloud WAN core network, which allows a gradual migration rather than a cut-over of the whole network.

Operating the network

Changes to a Cloud WAN network are changes to its policy, and the policy is versioned. A new policy version produces a change set that shows the effect, such as new segments or routes, before it is executed, and an earlier version can be restored if a change causes problems. Because the policy is a JSON document, it is stored in version control and changed through review like any other infrastructure code.

Sites connect to the core network through Site-to-Site VPN attachments, Connect attachments for SD-WAN appliances, or Direct Connect gateway attachments, and each attachment lands in a segment according to the attachment policies. AWS Network Manager shows the global topology, the routes in each segment and network events, and publishes metrics and events to CloudWatch and EventBridge, so the network is monitored like any other system.

Worked example

A three-Region core network defined by policy

A company operates in eu-west-1, us-east-1 and ap-southeast-1. Production and development must be isolated in every Region, both must reach shared services, and new VPCs should join the right segment without a ticket to the network team. The core network policy declares this once:

{
  "version": "2021.12",
  "core-network-configuration": {
    "asn-ranges": ["64512-64555"],
    "edge-locations": [{"location": "eu-west-1"}, {"location": "us-east-1"}, {"location": "ap-southeast-1"}]
  },
  "segments": [
    {"name": "prod", "require-attachment-acceptance": true},
    {"name": "dev", "require-attachment-acceptance": false},
    {"name": "shared"}
  ],
  "attachment-policies": [
    {"rule-number": 100, "condition-logic": "or",
     "conditions": [{"type": "tag-value", "operator": "equals", "key": "segment", "value": "prod"}],
     "action": {"association-method": "constant", "segment": "prod"}},
    {"rule-number": 200,
     "conditions": [{"type": "tag-value", "operator": "equals", "key": "segment", "value": "dev"}],
     "action": {"association-method": "constant", "segment": "dev"}}
  ],
  "segment-actions": [
    {"action": "share", "mode": "attachment-route", "segment": "shared", "share-with": ["prod", "dev"]}
  ]
}

A team that creates a VPC attachment tagged segment=dev is placed in the dev segment automatically in whichever Region it is; production attachments wait for approval. Shared services are reachable from both segments, but prod and dev never exchange routes. Adding a fourth Region is a one-line change to edge-locations, reviewed as a change set before it is executed, instead of new transit gateways, peerings and static routes.

Check yourself

How is Cloud WAN managed differently from Transit Gateway?

Show answer

Through one central network policy that defines segments and Regions, from which Cloud WAN builds the routing across Regions. Transit gateways are configured in each Region and peered by hand.

Exam Tips

Remember for the exam

  • A global, multi-Region network managed by a central policy points to Cloud WAN.
  • Segments in Cloud WAN span every Region and replace per-Region TGW route tables.
  • Attachment policies place VPCs into segments automatically by tag.
  • Service insertion in the policy sends traffic between segments through inspection.
  • Cloud WAN can peer with existing transit gateways for a gradual migration.