Establish Connectivity with Transit Gateway
AWS Transit Gateway (TGW) provides a central hub for connecting VPCs across multiple AWS accounts. This guide explains the Transit Gateway components, their architecture, and how to deploy them to establish network connectivity.
Components Overview
The Transit Gateway solution consists of several components that work together:
tgw/hub- Creates the Transit Gateway in the network account (
core-network). This is the central routing hub that all other VPCs connect to. tgw/attachment- Creates and manages Transit Gateway VPC attachments in connected accounts. Each account with a VPC needs an attachment to connect to the Transit Gateway.
tgw/routes- Manages Transit Gateway route tables in the network account. Controls how traffic flows between attachments.
vpc-routes- Configures VPC route tables in connected accounts to route traffic through the Transit Gateway. In stacks, this is typically configured as
vpc/routes/private.
Architecture
The Transit Gateway components work together to create a hub-and-spoke network topology:
- The Transit Gateway is created in the
core-networkaccount (tgw/hub) - VPCs in other accounts attach to the Transit Gateway (
tgw/attachment) - Transit Gateway route tables control routing between attachments (
tgw/routes) - VPC route tables in connected accounts direct traffic through the Transit Gateway (
vpc/routes/private)
Connected Accounts
In the reference architecture, the following accounts connect to the Transit Gateway:
core-network— The hub account where the Transit Gateway is deployedcore-auto— Automation account for self-hosted GitHub runnersplat-dev— Development environmentplat-staging— Staging environmentplat-prod— Production environmentplat-sandbox— Optional sandbox environment
Deployment
Deploy the Transit Gateway infrastructure using the network workflow:
Loading workflow...
This workflow deploys the components in the correct order:
- Creates the Transit Gateway hub in
core-network - Creates VPC attachments in each connected account
- Configures Transit Gateway route tables
- Updates VPC route tables in connected accounts