Explain AWS VPC and its core components (subnets, route tables, IGW, NAT).
A VPC (Virtual Private Cloud) is your isolated network within AWS.
- Subnets: Subdivisions of your VPC in a specific AZ. Public subnets have a route to the IGW; private subnets do not.
- Route Tables: Rules defining where traffic is directed. A public subnet’s route table has
0.0.0.0/0 → IGW. - Internet Gateway (IGW): Allows public subnets to communicate with the internet.
- NAT Gateway: Allows private subnets to make outbound internet requests (e.g., pulling packages) without exposing them to inbound internet traffic.