AWS Virtual Private Cloud (VPC) is the backbone of your cloud infrastructure. Think of it as your private, customizable office building in the cloud. In this section, we’ll create your first VPC step-by-step and explore the key concept of CIDR (Classless Inter-Domain Routing), which is crucial for managing your network’s IP addresses.
A Virtual Private Cloud (VPC) is a logically isolated network within AWS that you control. It’s your private space in the cloud where you can securely run applications, organize resources, and manage traffic.
Mental Model:
Think of a VPC as your office building:
Before we create your VPC, let’s understand how CIDR blocks define the IP address range for your network.
10.0.0.0/16
) to describe a network and its size.Think of CIDR like designing a neighborhood:
10.0.0.0
) is like the name of the neighborhood./16
) tells you how many houses (addresses) you can fit in that neighborhood./8
) creates a larger neighborhood with more houses, while a larger number (e.g., /24
) creates a smaller neighborhood.For example:
CIDR relies on binary representation to define the network portion and host portion of an IP address. Let’s take 10.0.0.0/16
as an example:
In binary, 10.0.0.0
looks like this:
00001010.00000000.00000000.00000000
The /16
means the first 16 bits (shown in bold below) are reserved for the network portion:
00001010.00000000
.00000000.00000000
The remaining 16 bits are for the host portion, allowing up to 65,536 devices in this network.
We’ll dive deeper into how binary and subnet masks work in a future article. For now, just understand that /16
reserves the first half of the address for the network, leaving the rest for devices.
/16
or /24
?The number after the slash (/
) tells us how many bits are used for the network portion of the address:
10.0.0.0/16
:
10.0
) identify the network.10.0.0.0/24
:
10.0.0
) identify the network.CIDR blocks help organize and manage your VPC network efficiently. They determine:
For instance, assigning a large /16
block to your VPC ensures you have plenty of room to create smaller subnets for specific applications or departments.
Now that we understand CIDR, let’s create your VPC:
Log in to the AWS Management Console
Define Your VPC Settings
MyFirstVPC
).10.0.0.0/16
.Click “Create VPC”
Picture your VPC as an office building:
Once your VPC is created:
/
), showing how many bits identify the network.Next, we’ll explore Subnets — the neighborhoods of your VPC — and learn how to divide your network into public and private spaces for better organization and security.