Step 2: Create Subnets
Subnets divide your VPC into smaller network segments. You will create two subnets: one public (accessible from the internet) and one private (isolated from direct internet access).
Important Note
If you created your VPC manually and did not use the wizard, you must create your subnets manually. Make sure you attach each subnet you create to your VPC.
Create the Public Subnet
- Navigate to VPC Dashboard and select Subnets.
- Click Create Subnet.
- Enter the following settings:
| Setting | Value |
|---|---|
| Name tag | Public-Subnet |
| VPC | My-Company-VPC |
| Availability Zone | Select any available zone |
| IPv4 CIDR Block | 10.0.1.0/24 |
- Click Create.
Create the Private Subnet
- Click Create Subnet again.
- Enter the following settings:
| Setting | Value |
|---|---|
| Name tag | Private-Subnet |
| VPC | My-Company-VPC |
| Availability Zone | Select any available zone |
| IPv4 CIDR Block | 10.0.2.0/24 |
- Click Create.
Subnet IP Ranges
| Subnet | CIDR Block | IP Range | Available IPs |
|---|---|---|---|
| Public | 10.0.1.0/24 | 10.0.1.0 - 10.0.1.255 | 251 |
| Private | 10.0.2.0/24 | 10.0.2.0 - 10.0.2.255 | 251 |
Note: AWS reserves 5 IP addresses in each subnet for internal use.