Subnets
Learn AWS subnets as AZ-scoped network segments for public, private, and isolated workload placement.
Last reviewed: June 2026
🔍 What Is It?
A subnet is a range of IP addresses inside a VPC. Each subnet exists in exactly one Availability Zone.
Subnets are usually categorized by routing behavior: public, private, or isolated.
🎯 Why Do We Need It?
Subnets let architects place resources based on exposure and failure domain.
Load balancers may live in public subnets, applications in private subnets, and databases in isolated private subnets.
Common developer mistakes:
- →Choosing defaults without checking security, cost, or failure behavior
- →Treating AWS services as isolated tools instead of part of an architecture
- →Skipping tags, alarms, IAM review, backups, and runbooks until production incidents happen
- →Building manually in the console and then struggling to reproduce environments
🏗️ What Happens in Real Projects?
A production VPC might create the same subnet tiers in three AZs:
- →public-a, public-b, public-c
- →app-a, app-b, app-c
- →data-a, data-b, data-c
This allows multi-AZ application and database deployments with consistent routing.
⚙️ How It Works
A subnet inherits the VPC CIDR boundary but has its own CIDR slice. Its route table determines whether it is public or private.
A public subnet has a route to an internet gateway and resources can use public IPs. A private subnet usually routes outbound internet through NAT. An isolated subnet has no internet route.
💻 Example
Subnet tiering model — A practical subnet plan for a three-tier app.
🤔 Common Confusions
❓ What makes a subnet public?
Its route table has a route to an internet gateway and resources have public IP behavior.
❓ Can one subnet span multiple AZs?
No. A subnet belongs to one AZ only.
❓ Should databases be in public subnets?
Almost never. Databases should usually be in private or isolated data subnets.
🚨 Common Production Issues
**Subnets too small** block Auto Scaling and managed service placement.
**Database in public subnet** creates unnecessary exposure.
**Only one AZ subnet tier** prevents high availability.
**Inconsistent route tables** make one AZ behave differently from another.
✅ Best Practices
Create matching subnet tiers across multiple AZs
Leave enough IP capacity for scaling and managed service overhead
Use public subnets only for resources that must receive public traffic
Place app and data tiers in private subnets
Name subnets clearly by tier and AZ
Review subnet routes before deploying sensitive resources
🏛️ Architect's Note
Subnets are placement decisions. They express which systems can be reached, how they fail by AZ, and how much future scale the network can support.
💬 Frequently Asked Questions
🎯 Key Takeaways
🔗 Related Topics
🎯 Practice this topic in interviews
↗ Where this topic fits
AWS Technology Guide
Return to the AWS learning hub.
Backend Engineer Career Path
A structured journey through Core Java, Spring Boot, production backend engineering, and interview preparation.
Python Developer Career Path
A practical route through Python fundamentals, automation, backend basics, testing, projects, interview preparation, and career growth.
Sources
Sources / References
Use these AWS references to verify the concept in official docs and continue into the most relevant SplashRide pages.
Official documentation
Related SplashRide pages
SplashRide AWS learning path
Browse the full AWS topic collection and learning order on SplashRide.
AWS Interview Prep
Practice AWS interview questions and scenario-based answers.
Backend Engineer Career Path
A structured journey through Core Java, Spring Boot, production backend engineering, and interview preparation.
Python Developer Career Path
A practical route through Python fundamentals, automation, backend basics, testing, projects, interview preparation, and career growth.
VPC
Understand Amazon VPC as the private network boundary for subnets, routing, security groups, NAT, load balancers, and workload isolation.
Route Tables
Learn AWS route tables for deciding where subnet traffic goes, including internet gateways, NAT gateways, VPC endpoints, and peering.