AWS Transit Gateway is a service that allows us to connect multiple VPCs. A single transit gateway acts as a central hub that connects to the VPCs through transit gateway attachments and allows traffic to flow through it.
In this Cloud Lab, you’ll deploy a React application with frontend and backend in different VPCs. You’ll start by creating two VPCs for the frontend and backend of the application. Next, you’ll create a transit gateway and transit gateway attachments to connect the frontend and backend VPC to the transit gateway. Once the network is established, you’ll launch an instance in frontend VPC with a React application. You’ll then create a backend instance and deploy a MySQL database. Finally, you’ll test the application to check if the frontend VPC can route traffic to the backend VPC and fetch the data from the MySQL database backend instance to display on the application’s frontend.
As you complete this Cloud Lab, you’ll be well equipped to connect multiple VPCs using transit gateway and route traffic between them. The architecture diagram below shows the final infrastructure that you’ll build in this Cloud Lab: