Skip to main content

Command Palette

Search for a command to run...

AWS NWD3: Internet Gateway

Updated
•2 min read•View as Markdown
AWS NWD3: Internet Gateway

What is an Internet Gateway

An Internet Gateway is a highly available AWS managed component that allows communication between a VPC and the public internet.

It performs two main functions:

  1. Provides a target in the VPC route table for internet traffic

  2. Performs public IPv4 address translation for instances

It is attached directly to a VPC, not to a subnet or instance.Without an Internet Gateway, resources inside the VPC cannot send or receive traffic from the internet.

How Internet Gateway Works in Real Flow

When a user tries to access an application running on an Amazon EC2 instance:

  1. User sends request to the public IP address

  2. Request reaches AWS edge network

  3. Traffic is forwarded to the Internet Gateway

  4. Internet Gateway forwards it into the Amazon Virtual Private Cloud

  5. VPC router checks the route table

  6. Packet is routed to the correct subnet and instance

Key Properties (Important for AWS Exams):
Internet Gateway is automatically scaled by AWS. No capacity limits.
It is managed by AWS and does not fail like a normal gateway.
A VPC can have only one Internet Gateway attached at a time.
There is no charge for creating an Internet Gateway.

Important Exam Trick (Very Common Question)

Having an Internet Gateway does NOT make your EC2 instance public.For an instance to be publicly accessible, all three must exist:

  1. Internet Gateway attached to VPC

  2. Route table entry

0.0.0.0/0 → Internet Gateway
  1. Instance must have Public IP or Elastic IP

Miss any of these and the instance will not be reachable from internet.

One Line Definition for Interviews

An Internet Gateway is a VPC component that enables bidirectional communication between resources in a VPC and the public internet.
User ↓ DNS resolves domain → IP ↓ Traffic enters AWS network ↓ Internet Gateway ↓ VPC routing ↓ EC2 instance

DNS resolution usually happens through services like Amazon Route 53.