How it works...
To access the internet from a VPC, or to access a VPC from the internet, we need an internet gateway. We need to attach it to our VPC and also create a route for it in a route table.
AWS created a main route table for our VPC when we created our VPC. The main route table is the primary route table that's created by AWS when we create a VPC. If a subnet is not associated explicitly with any route table, it will be associated with the main route table. A new subnet will be associated by default with the main route table until we associate it with another route table. It is good practice to not add public internet routes within the main route table. Instead, we can create another route table for public internet access and add ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access