Skip to content

// diagrams › aws

Hub-and-spoke inspection: Transit Gateway with a TGW-attached Network Firewall and centralised egress

A hub-and-spoke network on AWS with a Transit Gateway-attached Network Firewall and centralised egress: the routing, why egress crosses the gateway twice, costs, and when to go distributed.

Opens a copy in the editor, in a new tab, ready to change. No account needed.

Hub-and-spoke network diagram on AWS: spoke VPCs in two workload accounts send traffic to a shared Transit Gateway, a static route sends it to a TGW-attached Network Firewall, and inspected internet-bound traffic leaves through a NAT gateway and internet gateway in an egress VPC.

What’s in this diagram

services and parts

  • Workload
  • Transit Gateway (shared with AWS RAM)
  • Network Firewall (TGW attachment, AWS-managed VPC)
  • NAT gateway
  • Internet gateway
  • Firewall flow and alert logs
  • Internet

groups

  • AWS Cloud
  • Region
  • Workload account A
  • Spoke VPC A (10.1.0.0/16)
  • Workload account B
  • Spoke VPC B (10.2.0.0/16)
  • Network account
  • Egress VPC
  • Public subnets

Key points

  • Spoke VPCs send everything non-local to the Transit Gateway; a static route sends it on to the firewall attachment.
  • The firewall attachment lives in a VPC AWS manages for you. You cannot put a NAT gateway there, so internet egress still needs its own VPC.
  • Egress traffic crosses the Transit Gateway twice, and each crossing has a per-GB charge.
  • Inspecting inbound traffic through this attachment is not recommended. Inspect it at the edge instead.

The whole story, step by step: Transit Gateway network firewall architecture on AWS.

Your diagram is one sentence away.

Start drawing, free

No account needed to start.