A transit gateway is a brand new service, as of 2019, and it solves a problem that's faced by many architects who want to create complex environments spanning several networks. To understand the need for transit gateways, first, you need to understand the non-transitive nature of an AWS VPC.
A VPC can peer with other VPCs, which sets up a bi-directional route between those VPCs. However, what's not supported is transitive routing via an intermediate VPC, as shown in the following diagram:
VPC A and VPC B have a peering relationship. VPC B and VPC C also have a peering relationship. Network traffic can be routed successfully (indicated by the green arrows) from A to B and from B to C, but not from A to C via B (indicated by the red arrow).
Before Transit Gateway was introduced, a complex setup involving a Cisco Cloud Services Router...