AWS Default Routing
AWS Default Routing
2h 40m

In this section of the AWS Certified Advanced Networking - Specialty learning path, we introduce you to the various tools, technologies, and services used to connect on-premises environments to the AWS Cloud, including Direct Connect and VPNs.

Learning Objectives

  • Identify and describe how Direct Connect and VPNs are used to connect on-premises environments to the AWS Cloud
  • Describe advanced AWS Direct Connect connectivity scenarios, including when to leverage Public, Private, and Transit Virtual Interfaces (VIFs)
  • Understand routing fundamentals for static and dynamic routing in AWS along with industry-standard routing protocols such as Border Gateway Protocol (BGP)
  • Describe how to use encryption to secure traffic as it travels across VPNs and Direct Connect connections


The AWS Certified Advanced Networking - Specialty certification has been designed for anyone with experience designing, implementing, and operating complex AWS and hybrid networking architectures. Ideally, you’ll also have some exposure to the nuances of AWS networking, particularly regarding the integration of AWS services and AWS security best practices. Many exam questions will require advanced level knowledge of many AWS services, including AWS networking services. The AWS Cloud concepts introduced in this course will be explained and reinforced from the ground up.


In this lecture, we will discuss VPC default routing. When you create a VPC, an implicit route is created for you. You cannot see this router but it's there. This route is connected to each VPC subnet and address by using the first IP address of each subnet. We interact with 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 packages going through the router that the destination address matched by the entry. is the IPv4 CIDR block assigned to our VPC from which all the VPC subnets will obtain their address ranges. The local entry cannot be altered and it cannot 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 the Internet?

How will that affect our route tables? To allow instances in public subnets who also have public IP addresses to route traffic to the internet, we need to request an Internet gateway for our VPC and 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. An Internet gateway must be requested attached to VPC in order for it to appear as a target in our route table. Now, any traffic matching will be sent locally, everything else will be sent through the Internet gateway. But what about IPv6? Well, IPv6 works in the same way. Here's an example of route in IPv6 and route in IPv6 traffic through an Internet gateway. To allow instances in private subnets who only have private IP 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 create a new route table, associate the private subnets with a new route table, and add a route that route's 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 gateway. This is the NAT gateway deployed to a public subnet. We have then used the subnet associations tab and explicitly associated our private subnets with the 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 associations with the default route table. In every VPC, one route table it 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 subnets being given access to routes that they shouldn't be able to use, it is recommended that main route table only contains the local route. Route in IPv6 traffic 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 IP version 4. You request an egress-only Internet gateway in the same way you request an Internet gateway and you attach it to your VPC. You then edit a route table to use it. Here's an example of a route table configured to use an egress-only Internet gateway.


About the Author
Learning Paths

Jeremy is a Content Lead Architect and DevOps SME here at Cloud Academy where he specializes in developing DevOps technical training documentation.

He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 25+ years. In recent times, Jeremy has been focused on DevOps, Cloud (AWS, Azure, GCP), Security, Kubernetes, and Machine Learning.

Jeremy holds professional certifications for AWS, Azure, GCP, Terraform, Kubernetes (CKA, CKAD, CKS).