1. Home
  2. Training Library
  3. Networking, Connectivity, and Content Delivery (SAP-C02)

AWS Default Routing


Course Introduction
VPC Fundamentals
What is a VPC?
PREVIEW16m 20s
VPC Security and Control
VPC Connectivity
VPC Sharing using the AWS Resource Access Manager
Understanding Direct Connect, Implementation and Configuration
Why Direct Connect?
5m 25s
Understanding AWS Direct Connect - Connectivity Options

The course is part of this learning path

Instructor: Mike Brown

AWS Default Routing

In this lecture we will discuss VPC default routing. When you create a VPC, an implicit router is created for you. You cannot see this router but it’s there. This router is connected to each VPC subnet and addressed by using the first IP address of each subnet. 

We interact with this router by using route tables. When created, each VPC has a default route table. This route table will contain targets identified as local, here you can see an example of this.


The local target is used for all packets going through the router that has a destination address matched by the entry. is the IPv4 CIDR block assigned to our VPC from which all of the VPC subnets will obtain their address ranges.

This local entry can not be altered and it can not be deleted. This local entry means that EC2 instances deployed to different subnets in the same VPC will be able to route to each other.

But what if EC2 instances want to be able to route to the internet, how will that affect our route tables?

Instances in Public subnets

To allow instances in public subnets who also have public IP addresses to route traffic to the internet we need to.

  1. Request an internet gateway for our VPC.

  2. Adjust the route table to route traffic through the internet gateway.

Here is an example of what the route table would look like when configured to use an internet gateway.


Here we can see that we have added a default IPv4 route of that sends traffic to the internet gateway igw-0a976dfbefbc34d27. An internet gateway must be requested and attached to the VPC in order for it to appear as a target in our route table.

Now any traffic that matches will be sent locally and everything else ( will be sent through the internet gateway.

What about IPv6?

Well IPv6 works in the same way. Here is an example of local routing of IPv6 and routing IPv6 through an internet gateway:


Instances in Private subnets

To allow instances in private subnets who only have private addresses to access the internet we typically use a NAT Gateway. The NAT Gateway is deployed to a public subnet so that it can use the Internet Gateway to access the internet. We then:

  1. Create a new route table.

  2. Associate the Private Subnets with the new route table.

  3. Add a route that routes internet traffic through the NAT Gateway.

This is how the route table might look:


Here we see the default route but this time traffic that matches is sent to target nat-0b52733b65347a196, the NAT Gateway deployed to a public subnet.

We have then used the Subnet Associations tab and explicitly associated our private subnets with this route table.


Subnets can only be associated with one route table at a time so by associating the private subnets with this route table we are removing their association with the default route table.

In every VPC, 1 route table is designated the Main route table. This is the route table that all new subnets are associated with. Because of this and to reduce the chances of new students being given access to routes that they shouldn't be able to use, it is recommended that the main route table only contains the local route.

What about IPv6?

Routing IPv6 traffic to the internet from a private subnet works slightly differently than IPv4. IPv6 traffic from a private subnet is routed through an Egress Only Internet Gateway.  Egress Only Internet Gateways work just like a NAT Gateway but for IPv6 traffic instead of IPv4.

You request an Egress Only Internet Gateway in the same way you request an Internet Gateway and attach it to your VPC. You then edit a route table to use it. Here is an example of a route table configured to use an Egress Only Internet Gateway 



3h 20m

This section of the AWS Certified Solutions Architect - Professional learning path introduces you to the core networking concepts and services relevant to the SAP-C02 exam. We start with an introduction to the AWS Virtual Private Network (VPC) and networking services. We then understand the options available and learn how to select and apply AWS networking, DNS, and content delivery services to meet specific design scenarios relevant to the AWS Certified Solutions Architect - Professional exam. 

Want more? Try a Lab Playground or do a Lab Challenge

Learning Objectives

  • Get a foundational understanding of VPCs, their security, and connectivity
  • Learn about VPC sharing using the AWS Resource Access Manager
  • Discover inter-regional and intra-regional communication patterns in AWS
  • Learn about AWS Direct Connect, along with its implementation, configuration, and connectivity options
  • Understand routing in AWS, including static and dynamic routing
  • Understand the basics of networking, including Elastic IP addresses, Elastic Network Interfaces, networking with EC2, VPC endpoints, and AWS Global Accelerator
  • Learn about the DNS and content delivery services Amazon Route 53 and Amazon CloudFront
About the Author
Learning Paths

Danny has over 20 years of IT experience as a software developer, cloud engineer, and technical trainer. After attending a conference on cloud computing in 2009, he knew he wanted to build his career around what was still a very new, emerging technology at the time — and share this transformational knowledge with others. He has spoken to IT professional audiences at local, regional, and national user groups and conferences. He has delivered in-person classroom and virtual training, interactive webinars, and authored video training courses covering many different technologies, including Amazon Web Services. He currently has six active AWS certifications, including certifications at the Professional and Specialty level.