Boundary · AWS SERVICE CHEATSHEET

VPC Subnet (SUBNET)

Establishes Availability Zone isolation, private IPv4/IPv6 CIDR address sub-allocation, Network ACL (NACL) stateless filtering boundaries, and route table associations.

Open Interactive SUBNET Sandbox → Simulate in Architecture Studio

AWS Container Placement

VPC, AZ

Summary

A sub-allocation of a Virtual Private Cloud (VPC) IP address range bound to a single Availability Zone, serving as the network envelope for compute, database, and container resources.

When to Use (SAA-C03)

Place ALBs, NAT Gateways, and Bastions in Public Subnets; place EC2 app workers, ECS tasks, and RDS databases in Private Subnets.

Allowed Ingress Connections & Ports

Source ServiceProtocolPortArchitectural Rationale
IGWTCP, UDP, ICMPAllInbound public traffic routed via attached Internet Gateway
NATTCP, UDPAllOutbound return traffic from NAT Gateway
SUBNETALLAllInter-subnet VPC routing within VPC CIDR block
ALBHTTP, HTTPS80, 443, 8080Application Load Balancer traffic forwarding

Allowed Egress Targets & Ports

Target ServiceProtocolPortData Flow Rationale
SUBNETALLAllInter-subnet communication governed by Route Table local rule and NACLs
RTBROUTE0Packet lookup against associated Route Table
IGWALLAllDirect internet egress via public route table
NATTCP, UDP80, 443Outbound egress via NAT Gateway in a public subnet

Key Configuration Parameters & AWS Best Practices

ParameterFormat / ExamplePurpose & Rationale
IPv4 CIDR Block (cidrBlock) (Required)10.0.1.0/24 (251 usable IPs)The IPv4 network address prefix allocated to the subnet within the parent VPC CIDR boundary. Why: Determines the pool of private IP addresses available for EC2 instances, ENIs, and container pods. Must not overlap with any other subnet in the same VPC.
Availability Zone (availabilityZone) (Required)us-east-1aThe physical AWS Availability Zone where subnet infrastructure resides. Why: Subnets are strictly zonal resources that cannot span multiple Availability Zones; multi-AZ architectures require at least 2 distinct subnets in separate AZs.
Subnet Routing Type (isPublicSubnet) (Required)trueIndicates whether the subnet route table provides a direct route to an Internet Gateway. Why: Determines whether compute workloads can receive direct public traffic or require a NAT Gateway for outbound updates.
Auto-Assign Public IPv4 (mapPublicIpOnLaunch)falseAutomatically assigns a public IPv4 address to the primary elastic network interface (eth0) of instances launched into this subnet. Why: Convenient for public bastion hosts or public web servers in public subnets.
Custom Route Table ID (routeTableId)rtb-0123456789abcdef0Explicit association of a custom Route Table with this subnet. Why: If omitted, the subnet automatically inherits the VPC Main Route Table.
Network ACL ID (naclId)acl-xxxxxxxxxxxxxxxxxStateless subnet packet filter associated with the subnet boundary. Why: Allows creating defense-in-depth network firewalls at the subnet perimeter.

Practice Labs Using VPC Subnet

CLF-01

Missing Internet Gateway Route

Attach or route default outbound traffic 0.0.0.0/0 to the Internet Gateway in the public route table.…

CLF-02

Locked-Out Security Group Ingress

Add an inbound rule allowing TCP port 80 from 0.0.0.0/0 to the web instance Security Group.…

CLF-03

Public Database Exposure Vulnerability

Move or configure RDS to be in a private subnet, disable public accessibility, and restrict ingress exclusivel…

CLF-04

Single Point of Failure (Single-AZ)

Add a secondary subnet in us-east-1b and front instances with an Application Load Balancer across both Availab…

CLF-06

Tight Coupling in Transaction Processing

Decouple the architecture by placing an Amazon SQS queue between the producer and consumer.…

SAA-01

FinTech Payment Ledger: $6,750 NAT Gateway S3 Cost Surge

Add an S3 prefix-list destination route in the private route table targeting the S3 Gateway Endpoint.…

Frequently Asked Questions

Where does VPC Subnet live inside an AWS VPC architecture?

Valid container placement: VPC, AZ. Establishes Availability Zone isolation, private IPv4/IPv6 CIDR address sub-allocation, Network ACL (NACL) stateless filtering boundaries, and route table associations.

When should I use VPC Subnet on the AWS SAA-C03 exam?

Place ALBs, NAT Gateways, and Bastions in Public Subnets; place EC2 app workers, ECS tasks, and RDS databases in Private Subnets.

Can I simulate VPC Subnet packet routing without an AWS account?

Yes. CloudTracer simulates VPC Subnet along with 53 AWS services directly in your browser and exports production Terraform HCL.