The VPC staging has four subnets: web-a, web-b, data-a and data-b. All of them use the main route table.
-
Keep the VPC's id in
VPC:shVPC=$(aws ec2 describe-vpcs --filters Name=tag:Name,Values=staging --query "Vpcs[0].VpcId" --output text) -
Create a route table named
web, keeping its id inRT, and associate it with both web subnets. Each association needs that subnet's id inSUBNETfirst. -
Create a route table named
dataand associate it with both data subnets. -
Read the routes of
web.