A VPC (Virtual Private Cloud) is your house. Subnets are the rooms. You decide which rooms have windows (Public) and which are locked vaults (Private).
CIDR notation defines the size. /16 is huge (65,536 IPs). /24 is standard (256 IPs). /32 is just one IP.
Public: Has a Route Table pointing to an Internet Gateway (IGW).
Private: Has NO route to IGW. It uses a NAT Gateway to talk out, but nothing can talk in.
Mission: Drag the items to the correct zone.
â ī¸ Putting a Database in Public is a Security Risk. Putting a Load Balancer in Private makes it Unreachable.
In a /24 (256 IPs), AWS reserves 5 IPs. So you actually get 251 usable IPs.
Network Access Control List. It's a firewall for the Subnet itself (the building door), whereas Security Groups are firewalls for the Instance (the apartment door).