Skill 5.1.1

Configure a VPC (for example, subnets, route tables, network ACLs, security groups, NAT gateways, internet gateway, egress-only internet gateway)

Key Concepts

A VPC has a primary IPv4 CIDR block (/16 to /28), optional secondary blocks and an optional IPv6 block. Each subnet lives in one AZ, and AWS reserves five addresses in it. A subnet is public when its route table sends 0.0.0.0/0 to an internet gateway; private subnets reach the internet through a NAT gateway (zonal, in a public subnet with an Elastic IP, or regional, which spans AZs automatically). IPv6 instances use an egress-only internet gateway for outbound-only access.

Security groups are stateful allow lists on ENIs and can reference other security groups. Network ACLs are stateless, ordered allow and deny rules on subnets, so return traffic on ephemeral ports (1024-65535) must be allowed explicitly. VPC IP Address Manager (IPAM) plans and tracks CIDRs across accounts and Regions.