
- An Internet Gateway (IGW) is a horizontally scaled, redundant VPC component that provides a target in your VPC route tables for internet-routable traffic.
- An IGW is attached to a VPC and is region-resilient: it serves all Availability Zones in that region.
- If there is no IGW attached to a VPC, all subnets in that VPC remain private (no direct internet connectivity).
How to make a subnet public
Creating an IGW is necessary but not sufficient to make a subnet public. The required sequence is:
- Create an Internet Gateway.
- Attach the Internet Gateway to the target VPC.
- Create (or use) a custom route table for the VPC.
- Add a default route —
0.0.0.0/0for IPv4 (and::/0for IPv6 if applicable) — in that route table that targets the Internet Gateway. - Associate the subnet you want to be public with that route table.

- Instances launched into a public subnet receive a private IP address by default. To be reachable from the internet an instance also needs a public IP.
- Many subnets (for example, default VPC subnets) have auto-assign public IPv4 enabled so instances receive a public IP automatically at launch. Otherwise, you can assign a public IP manually.
- Two common ways to provide a public IP:
- Auto-assign a public IPv4 address during instance launch (or enable auto-assign on the subnet).
- Allocate an Elastic IP (EIP) and associate it with the instance.

Public IP vs Elastic IP: auto-assigned public IPs change when the instance stops and restarts, while Elastic IPs are static and remain allocated to your account until you explicitly release them.
- Internet Gateways allow VPC resources to send traffic to, and receive traffic from, the internet.
- An IGW is region-resilient and covers all Availability Zones in the region.
- A VPC can have at most one IGW attached; an IGW can be attached to only one VPC.
- A subnet becomes public when it is associated with a route table whose default route (
0.0.0.0/0) points to the IGW, and instances in that subnet have a public IP (auto-assigned or an Elastic IP).