Lesson 05 β Route Tables
Learning Path
βοΈ Phase 2 β AWS Cloud Security
π Module 04 β Amazon VPC & Network Security
π― Lesson Objective
Section titled βπ― Lesson ObjectiveβBy the end of this lesson, you will be able to:
- Understand what Route Tables are.
- Explain how routing works inside an Amazon VPC.
- Create and manage Route Tables.
- Associate Route Tables with Subnets.
- Configure routes using the AWS Console and AWS CLI.
- Verify routing in an enterprise AWS environment.
π Lesson Information
Estimated Time: 90 Minutes
Difficulty: Beginner
Prerequisites: Lesson 04 β Public & Private Subnets
Hands-on Lab: Yes
πΌ Business Value
Section titled βπΌ Business ValueβImagine building a city with roads but no signboards.
People would have no idea how to reach:
- Office Buildings
- Hospitals
- Schools
- Shopping Centres
Eventually, traffic would stop.
Cloud networking works exactly the same way.
Every packet travelling inside AWS needs instructions telling it where to go.
Those instructions are stored inside Route Tables.
Without Route Tables:
- Applications cannot communicate.
- Servers cannot reach the Internet.
- Databases become inaccessible.
- Load Balancers cannot forward requests.
π’ CloudNova Scenario
Section titled βπ’ CloudNova ScenarioβCloudNova has created the following network.
CloudNova-VPC
10.10.0.0/16
β
βββ Public Subnet
10.10.1.0/24
β
βββ Private App Subnet
10.10.2.0/24
β
βββ Private DB Subnet
10.10.3.0/24Howeverβ¦
No applications can communicate.
The reason?
No routing has been configured.
As a Cloud Security Engineer, your next task is to create Route Tables.
π What is a Route Table?
Section titled βπ What is a Route Table?βA Route Table is a collection of rules that tells AWS where network traffic should go.
Each subnet must be associated with one Route Table.
Every Route Table contains one or more routes.
Each route has:
- Destination
- Target
Example:
Destination
β
Target
β
Where traffic should goπ¦ Components of a Route
Section titled βπ¦ Components of a Routeβ| Component | Description |
|---|---|
| Destination | IP Address or CIDR Range |
| Target | Where traffic is forwarded |
Example:
| Destination | Target |
|---|---|
| 10.10.0.0/16 | Local |
| 0.0.0.0/0 | Internet Gateway |
π Enterprise Example
Section titled βπ Enterprise ExampleβPublic Subnet
β
Public Route Table
β
Internet Gateway
β
InternetPrivate subnet
Private Subnet
β
Private Route Table
β
NAT Gateway
β
InternetDatabase subnet
Private DB
β
Private Route Table
β
Local Communication Onlyπ Local Route
Section titled βπ Local RouteβEvery Route Table automatically contains:
Destination
10.10.0.0/16
β
Target
LocalThis route allows communication between resources inside the VPC.
Never delete this route.
π Public Route
Section titled βπ Public RouteβTo allow Internet access:
Destination
0.0.0.0/0
β
Internet GatewayThis sends all non-local traffic to the Internet Gateway.
π Private Route
Section titled βπ Private RouteβPrivate Subnets should not connect directly to the Internet.
Instead they use:
0.0.0.0/0
β
NAT GatewayApplications receive outbound Internet access while remaining inaccessible from the Internet.
π CloudNova Enterprise Architecture
Section titled βπ CloudNova Enterprise ArchitectureβInternet
β
Internet Gateway
β
ββββββββββββββ
Public Route Table
β
Public Subnet
β
Application Load Balancer
β
ββββββββββββββ
Private Route Table
β
Private App Subnet
β
EC2
β
ββββββββββββββ
Private Route Table
β
Private DB Subnet
β
Amazon RDSπ Lab 01 β View Existing Route Tables
Section titled βπ Lab 01 β View Existing Route TablesβOpen
AWS Console
β
VPCNavigate to
Route TablesReview
- Route Table Name
- VPC
- Routes
- Associated Subnets
π Lab 02 β Create Public Route Table
Section titled βπ Lab 02 β Create Public Route TableβNavigate to
Route Tables
β
Create Route TableExample
| Setting | Value |
|---|---|
| Name | Public-RT |
| VPC | CloudNova-VPC |
Click
Create Route TableAdd Internet Route
Section titled βAdd Internet RouteβSelect
Public-RT
β
Routes
β
Edit Routes
β
Add RouteConfigure
| Destination | Target |
|---|---|
| 0.0.0.0/0 | Internet Gateway |
Save Changes.
Associate Public Subnet
Section titled βAssociate Public SubnetβNavigate to
Subnet Associations
β
EditSelect
Public-Subnet-ASave.
π Lab 03 β Create Private Route Table
Section titled βπ Lab 03 β Create Private Route TableβCreate another Route Table.
Example
| Setting | Value |
|---|---|
| Name | Private-RT |
| VPC | CloudNova-VPC |
Associate Private Subnets
Section titled βAssociate Private SubnetsβAssociate:
- Private-App-A
- Private-DB-A
At this stage, do not add a default Internet route.
Later, after creating a NAT Gateway, you will update this Route Table.
π» AWS CLI Lab
Section titled βπ» AWS CLI LabβList Route Tables
Section titled βList Route Tablesβaws ec2 describe-route-tablesCreate Public Route Table
Section titled βCreate Public Route Tableβaws ec2 create-route-table \ --vpc-id vpc-xxxxxxxxAdd Name Tag
Section titled βAdd Name Tagβaws ec2 create-tags \ --resources rtb-xxxxxxxx \ --tags Key=Name,Value=Public-RTCreate Internet Route
Section titled βCreate Internet Routeβaws ec2 create-route \ --route-table-id rtb-xxxxxxxx \ --destination-cidr-block 0.0.0.0/0 \ --gateway-id igw-xxxxxxxxAssociate Route Table
Section titled βAssociate Route Tableβaws ec2 associate-route-table \ --subnet-id subnet-xxxxxxxx \ --route-table-id rtb-xxxxxxxxCreate Private Route Table
Section titled βCreate Private Route Tableβaws ec2 create-route-table \ --vpc-id vpc-xxxxxxxxTag Private Route Table
Section titled βTag Private Route Tableβaws ec2 create-tags \ --resources rtb-yyyyyyyy \ --tags Key=Name,Value=Private-RTAssociate Private Subnet
Section titled βAssociate Private Subnetβaws ec2 associate-route-table \ --subnet-id subnet-yyyyyyyy \ --route-table-id rtb-yyyyyyyyView Route Tables
Section titled βView Route Tablesβaws ec2 describe-route-tablesView Specific Route Table
Section titled βView Specific Route Tableβaws ec2 describe-route-tables \ --route-table-ids rtb-xxxxxxxxβ Verify
Section titled ββ VerifyβConfirm:
Public Route Table
10.10.0.0/16 β Local
0.0.0.0/0 β Internet GatewayPrivate Route Table
10.10.0.0/16 β Local(No Internet route yet.)
π Troubleshooting
Section titled βπ TroubleshootingβProblem
EC2 cannot access the Internet.
Possible causes
- Internet Gateway missing.
- Incorrect Route Table.
- Route Table not associated.
- Wrong subnet.
Problem
Wrong Route Table associated.
Solution
Navigate to:
Route Tables
β
Subnet Associations
β
EditAssociate the correct subnet.
Problem
Internet route missing.
Solution
Verify:
0.0.0.0/0
β
Internet Gatewayexists in the Public Route Table.
π’ Enterprise Notes
Section titled βπ’ Enterprise NotesβCloudNova standards:
- Separate Route Tables for Public and Private Subnets.
- Never expose database subnets directly to the Internet.
- Use clear naming conventions.
- Review Route Tables during security audits.
- Document all routing decisions.
- Minimise unnecessary outbound routes.
π« Common Mistakes
Section titled βπ« Common Mistakesββ Associating a Private Subnet with a Public Route Table.
β Forgetting to associate a Route Table with a Subnet.
β Sending database traffic directly to the Internet.
β Using one Route Table for every subnet without considering security requirements.
β Deleting the Local route.
π§ͺ DIY Challenge
Section titled βπ§ͺ DIY ChallengeβUsing your AWS account:
Create:
- Public-RT
- Private-RT
Associate:
- Public-Subnet-A β Public-RT
- Private-App-A β Private-RT
- Private-DB-A β Private-RT
Configure:
Public Route Table
10.10.0.0/16 β Local
0.0.0.0/0 β Internet GatewayVerify:
- Route Tables created.
- Correct subnet associations.
- Local route present.
- Internet route configured only for the Public Route Table.
Take screenshots of:
- Route Tables
- Routes
- Subnet Associations
- AWS CLI output (
describe-route-tables)
π Knowledge Check
Section titled βπ Knowledge Checkβ-
What is a Route Table?
-
What is the purpose of the Local route?
-
What does the destination
0.0.0.0/0represent? -
Which Route Table should be associated with a Public Subnet?
-
Which Route Table should be associated with a Private Subnet?
-
Can a subnet be associated with more than one Route Table at the same time?
-
Which AWS CLI command lists Route Tables?
-
Why shouldnβt database subnets use a Public Route Table?
-
What happens if no Route Table is associated with a subnet?
-
Why are Route Tables important in enterprise cloud networking?
π‘ Key Takeaways
Section titled βπ‘ Key TakeawaysβAfter completing this lesson, you should understand:
- Route Tables determine how network traffic flows within an Amazon VPC.
- Every subnet must be associated with a Route Table.
- Public Route Tables use an Internet Gateway for outbound internet access.
- Private Route Tables typically use a NAT Gateway for secure outbound connectivity.
- Proper routing is essential for building secure, scalable and enterprise-ready AWS networks.
π Next Lesson
Section titled βπ Next Lessonββ‘οΈ Lesson 06 β Internet Gateway & NAT Gateway