1.2 Subnet
Info
Since there is currently no need for a database or other services, you will only create public subnet.
A subnet is a range of IP addresses in your VPC. A subnet must reside in a single Availability Zone. After creating a VPC, you can add EC2 instance(s) to the subnet.
Create Public Subnet
At the VPC management console:
- Click Subnets.
- Click Create subnet.
At the Create subnet page, enter the following information:
- VPC: Choose the VPC with tag
vpc-inference-1
. - Name tag:
subnet-inference-1
. - Availability Zone: ap-southeast-1a.
- IPv4 subnet CIDR block:
10.0.0.0/28
. - Click Create subnet.
- VPC: Choose the VPC with tag
After the subnet is created, the console will look like this.
Since public subnet should have access to the Internet, you have to assign it a public IP address.
- Click Actions.
- Click Edit subnet settings.
- Check Enable auto-assign public IPv4 address.
- Click Save.