Create Subnet
Creating Subnets in Your Amazon VPC
ℹ️ Overview
- A subnet is a network segment within a VPC
- Subnets let you distribute resources across Availability Zones (AZs)
- Subnets can be classified as public or private
🔒 Steps
- Open the VPC console
- Select Subnets from the left-hand menu
- Click Create subnet

- Select the VPC
- In the Create subnet screen
- Select the ASG VPC you created earlier
- The VPC ID is displayed for confirmation

- Configure the first subnet
- Subnet name: Enter
Public Subnet 1
- Availability Zone: Select ap-southeast-1a
- IPv4 CIDR: Enter
10.10.1.0/24 (providing 256 IP addresses)
- Click Add new subnet to create several subnets at once, or Create subnet to create them one at a time


- Confirm the subnet was created successfully
- You’ll see a success message
- The new subnet appears in the list with the correct CIDR and AZ

💡 Creating the Remaining Subnets
- Repeat the process to create the following subnets:
- Public Subnet 2
- Subnet name:
Public Subnet 2
- CIDR: 10.10.2.0/24
- AZ: ap-southeast-1b



- Private Subnet 1
- Subnet name:
Private Subnet 1
- CIDR: 10.10.3.0/24
- AZ: ap-southeast-1a



- Private Subnet 2
- Subnet name:
Private Subnet 2
- CIDR: 10.10.4.0/24
- AZ: ap-southeast-1b



⚠️ A Note on Availability Zones
AWS uses two related concepts:
- Availability Zone (AZ): the display name (e.g. ap-southeast-1a)
- AZ ID: the actual identifier of the AZ (e.g. usw1-az1)
AWS randomly maps AZ names to AZ IDs differently for each account to keep resources evenly distributed. When designing multi-AZ architectures that span accounts, always reference the AZ ID rather than the AZ name.

Configuring Auto-assign Public IP
ℹ️ Purpose
This lets EC2 instances launched in a public subnet automatically receive a public IP address.
- Configure Public Subnet 1
- Select Public Subnet 1 from the subnet list
- Click Actions
- Choose Edit subnet settings

- Enable the Auto-assign IP setting
- Under Auto-assign IP settings, enable Enable auto-assign public IPv4 address
- This ensures that any EC2 instance launched in this subnet automatically receives a public IP
- Click Save


- Repeat the same configuration for Public Subnet 2
- Select Public Subnet 2 from the list
- Click Actions > Edit subnet settings
- Enable Enable auto-assign public IPv4 address
- Click Save to apply the changes


