Route Tables as Security Controls
Use routing to keep sensitive subnets isolated by design.
Route Tables as Security Controls is a free AWS Security Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the AWS Security Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Routing Is Security
A route table is a set of rules that decides where network traffic from a subnet is directed. Beyond connectivity, route tables are a security control: by controlling which destinations a subnet can reach, you decide what is even possible before any firewall rule is consulted.
How Routes Work
Each route maps a destination CIDR to a target such as an internet gateway, NAT gateway, peering connection, or transit gateway. AWS uses the most specific matching route for each packet. The local route for the VPC CIDR is always present and cannot be removed.
Defining Public and Private
The presence or absence of a route to the internet gateway is what makes a subnet public or private. Removing that route instantly turns a subnet private. This is why route tables, not subnet settings, are the true determinant of internet exposure.
Subnet Associations
Each subnet is associated with exactly one route table, though a route table can serve many subnets. Subnets without an explicit association use the VPC main route table. Keeping public and private subnets on separate route tables makes their access rules clear and auditable.
Isolating Sensitive Subnets
To isolate a data subnet, give it a route table with no internet or NAT route at all, only the local VPC route. Such a subnet can communicate within the VPC but has no path to the internet in either direction, enforcing isolation structurally rather than relying solely on firewall rules.
Routing to Endpoints
When you create a gateway VPC endpoint for S3 or DynamoDB, AWS adds a route to the endpoint in the relevant route tables. This directs that AWS-service traffic over the private endpoint instead of the internet, a routing change that both enables and secures private access.
Steering Through Inspection
Route tables can force traffic through an inspection appliance or AWS Network Firewall before it leaves the VPC. By routing a subnet egress to a firewall endpoint rather than directly to NAT, you guarantee every outbound packet is inspected. Routing thus enforces where security checks happen.
Peering and Transit Routes
To reach another VPC, a route must point to a peering connection or transit gateway. Omitting that route keeps networks separate. Adding overly broad routes can unintentionally open paths between environments, so route entries should be as specific as the connectivity you truly intend.
The Risk of Broad Routes
An overly permissive route, such as sending 0.0.0.0/0 to an internet gateway in a tier that should be private, silently makes that tier public. Auditing route tables for unexpected internet or cross-VPC routes is an important part of securing a VPC.
Route Tables in Defense in Depth
Combine routing with NACLs and security groups: route tables decide what paths exist, NACLs and security groups decide what traffic is allowed on those paths. A destination with no route is unreachable regardless of firewall rules, making routing the outermost layer of network control.
Summary
Treat route tables as a deliberate security boundary. Use them to define public versus private, isolate sensitive subnets, steer traffic through inspection, and control cross-VPC reach. Reviewing routes for unintended paths is as important as reviewing firewall rules.
Quick Check
Apply route-table security reasoning.
Recap
Route tables map destination CIDRs to targets and use the most specific match; the local VPC route is always present. They define public versus private via the internet-gateway route, isolate sensitive subnets (local route only), direct traffic to VPC endpoints or inspection firewalls, and control cross-VPC reach through peering or transit routes. Audit for unintended internet or cross-VPC paths.
Frequently asked questions
Is the “Route Tables as Security Controls” lesson free?
Yes — the full text of “Route Tables as Security Controls” is free to read here on the web, and the AWS Security Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the AWS Security Academy course, upgrade to CoddyKit PRO.
What will I learn in “Route Tables as Security Controls”?
Use routing to keep sensitive subnets isolated by design. You practise AWS Security Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start AWS Security Academy?
No prior experience is required. AWS Security Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Route Tables as Security Controls” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this AWS Security Academy lesson?
Yes. Every AWS Security Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Public and Private Subnet Design
- Internet, NAT, and Egress Gateways
- Route Tables as Security Controls
- Securing VPC Peering and Transit Gateway