

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Virtual Private Cloud (VPC)
incomplete
2: CIDR Blocks
incomplete
3: Subnetting
incomplete
4: Internet Gateways (IGW)
incomplete
5: Route Tables
incomplete
6: Private Subnets
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
We've attached an internet gateway to our VPC, but nothing tells the subnets it exists or when to use it.
To do that we need a route, and routes live in the creatively named route table. It is literally just a list of routes.
We can add a special kind of route, a "default route," to our table. It is a catch-all rule that says:
"If you don't have a specific address for something, look here."
This lets us create rules for things we care about (like local traffic). If we don't have a specific rule for something, we send it to the internet. When we're done with this lesson, our VPC will look like this:
Create a route table that sends public subnet traffic to the internet gateway.
Whew! Finally, we have "public" subnets that can connect to the internet.
Take a moment to review your "Internet gateways" and "Route tables" in the VPC dashboard.
Run and submit the CLI tests.
If you want to use the CLI instead, here's the command structure:
# Create a route table
aws ec2 create-route-table --vpc-id <vpc-id> --tag-specifications 'ResourceType=route-table,Tags=[{Key=Name,Value=<name>}]'
# Associate the route table with a subnet (run once per public subnet)
aws ec2 associate-route-table --route-table-id <rt-id> --subnet-id <subnet-id>
# Add a route to the route table
aws ec2 create-route --route-table-id <rt-id> --destination-cidr-block 0.0.0.0/0 --gateway-id <igw-id>