AWS Builder Center
AWS VPC Explained: Creating Your Own Network in the Cloud

AWS VPC Explained: Creating Your Own Network in the Cloud

Learn how Amazon VPC works and explore CIDR blocks, public and private subnets, and essential networking components. Understand cloud networking through a simple real-world example.

I am Computer Science Student. Currently pursuing my graduation in MITS.
Have you ever wondered how companies organize their cloud resources and control which resources can communicate with the internet?
This is where Amazon VPC (Virtual Private Cloud) comes in!

What is a VPC?

Amazon VPC allows us to create a logically isolated virtual network within AWS. We can decide our IP address range, create subnets, control network traffic, and decide how our resources communicate with each other and the internet.
Think of it as creating your own private network in the cloud!

1. Understanding CIDR Blocks

When creating a VPC, we define an IP address range using CIDR notation.
For example:  10.0.0.0/16 
AWS allows IPv4 VPC CIDR blocks from  /16  to  /28 .
The smaller the prefix number, the larger the IP address range.

2. What are Public and Private Subnets?

After creating a VPC, we divide its IP address range into smaller networks called subnets.
Public Subnet:
  • Has a route to an Internet Gateway.
  • Can host resources that need internet connectivity, such as a public-facing web server.
  • Resources also need suitable public IP addressing and security rules for internet access.
Private Subnet:
  • Does not have a direct route to an Internet Gateway.
  • Commonly used for databases and backend application servers.
  • Can use a NAT Gateway for outbound internet access when required.

3. A Real-World Example

Imagine building an online shopping application.
  • Public Subnet: Hosts the frontend or public-facing web server.
  • Private Subnet: Hosts the backend application and database.
This separation helps control network access and protects resources that should not be directly accessible from the internet.

Important VPC Components

  • VPC: Your isolated virtual network.
  • Subnet: A smaller IP address range inside your VPC.
  • Internet Gateway: Provides a connection between the VPC and the internet.
  • Route Table: Controls where network traffic is directed.
  • NAT Gateway: Allows resources in private subnets to initiate outbound internet connections.

Test Your Understanding!

Suppose you are building an application with a frontend, backend, and database.
Where would you place the database?
A. Public Subnet
B. Private Subnet
C. Internet Gateway
Think about your answer and share it in the comments!

Keep Learning
Start with the official  AWS VPC documentation .
Building a VPC is one of the first steps toward understanding AWS networking. Start small, experiment with subnets, and gradually explore how traffic moves inside your cloud network.
Happy Learning!
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article