We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
System Design Masterclass · Cloud Infrastructure
Free preview: the first 2 parts of this 6-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Cloud Infrastructure
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
It is easy and good
“It is really nice and good Please join the course”
You've created a VPC. You've set up subnets, assigned IP ranges, launched instances. But none of them can reach the internet. Nobody on the internet can reach them. Your VPC is a sealed box.
An Internet Gateway is the bridge. It connects your VPC to the public internet, enabling two-way communication for resources in public subnets. Without it, your web servers can't serve traffic, your APIs can't receive requests, and your load balancers can't distribute incoming connections.
It sounds simple, and it is. An Internet Gateway is one of the least complex components in cloud networking. But understanding where it fits in the routing chain matters, because misconfiguring the route table is the number one reason developers spend hours debugging "why can't my instance reach the internet."
An Internet Gateway performs two functions:
1. Route target: It appears in your route table as the target for internet-bound traffic. A public subnet's route table contains a rule like:
| Destination | Target |
|---|---|
| 10.0.0.0/16 | local |
| 0.0.0.0/0 | igw-abc123 |
The first rule keeps VPC-internal traffic local. The second rule sends everything else to the Internet Gateway.
2. NAT for public IPs: When an instance with a public IP sends traffic through the IGW, the gateway translates the private IP to the public IP (and vice versa for return traffic). This is a 1:1 static NAT, different from the many-to-one NAT that NAT Gateway performs.
Key characteristics:
What an IGW does NOT do: It doesn't make private subnet resources internet-accessible. If an instance has no public IP and its subnet has no route to the IGW, the Internet Gateway is irrelevant to it.