Skip to main content
Cloud / DevOpsCloud SecurityDiagramBeginner

VPC & Subnet

KO: VPC & 서브넷·EN: VPC & Subnet·JA: VPC・サブネット

A logically isolated virtual private network in the cloud partitioned into Public Subnets (internet-facing entry points) and Private Subnets (isolated apps and databases)

Table of Contents

Structure Diagram

VPC Tiered Isolation (IGW → Public Subnet → Private Subnet)Tap a node
HTTPSInternal5432/SGOutboundInternet …Public Su…NAT Gatew…Private A…Isolated …
ROOTInternet Gateway
1 link
Quick Answer

What is VPC & Subnet?

A logically isolated virtual private network in the cloud partitioned into Public Subnets (internet-facing entry points) and Private Subnets (isolated apps and databases). It is a core concept in Cloud Security within Cloud / DevOps.

Core Principles

A Virtual Private Cloud (VPC) is a logically isolated virtual network inside a public cloud where you control IP address ranges (CIDR blocks, e.g., 10.0.0.0/16), route tables, and firewall rules. Within a VPC, Subnets partition the address space across Availability Zones and security tiers:

  • Public Subnets: Have a direct route to an Internet Gateway (IGW) and host only internet-facing entry points like Load Balancers and NAT Gateways.
  • Private Subnets: Have no public IP exposure and cannot be reached directly from the internet, isolating application servers and databases from external scanners.

Practical Takeaways

  • Never put databases or app servers in Public Subnets: Expose only load balancers or CDNs publicly; keep compute and RDS/Redis strictly inside private or isolated subnets protected by Security Groups.
  • Plan non-overlapping CIDR blocks early: Reserve distinct CIDR ranges per environment (dev/stage/prod) and leave generous room for Kubernetes Pod IPs so future VPC Peering or Transit Gateway links never collide.
  • Cut NAT Gateway bills with VPC Endpoints: Routing heavy S3 or container registry (ECR) traffic through a NAT Gateway incurs steep per-GB charges; use Gateway/Interface VPC Endpoints for direct private backbone access.

Notable Examples

  • Multi-AZ 3-Tier VPC Architecture: Mirrors Public (ALB/NAT), Private App (EKS/ECS), and Isolated Data (RDS) subnets across 2–3 Availability Zones.
  • AWS VPC, GCP VPC & Azure VNet: Foundational cloud networking primitives paired with stateful Security Groups and NACLs.
  • Hybrid Cloud Extensions: Connects on-premises data centers directly to private cloud subnets over Direct Connect or VPN.