Subnets

A subnet is a range of IP addresses in your VPC. You can launch AWS resources into a specified subnet. Public subnets are for resources that must be connected to the internet, and private subnets for resources that won't be exposed to the internet.

In this section we will create two public and two private subnets in each of two availability zones within your VPC.

Subnets

  1. In the VPC panel on the left click on Subnets

  2. Click on Create subnet button in the top right corner. There might be existing subnets if there is a default VPC already.

    Create Subnet

  3. Choose VPC A from the VPC ID dropdown.

    VPC dropdown

  4. In the Subnet settings section

    • Enter the name as VPC A Public Subnet AZ1
    • Select the Availablity Zone of us-east-1a
    • Enter a CIDR block of 10.0.0.0/24:
    • Click Create subnet

    Subnet Settings

  5. You should have a new subnet listed under Subnets.

    Create Subnet Result

  6. Click on Create subnet again

  7. Under Subnet settings

    • Select VPC A
    • Enter a name of VPC A Private Subnet AZ1
    • Select the Availablity Zone of us-east-1a
    • Enter a CIDR block of 10.0.1.0/24
    • Click Create subnet

    Subnet 2 Settings

  8. Click on Create subnet again and

    • Select VPC A
    • Enter a name VPC A Public Subnet AZ2
    • Select the Availablity Zone of us-east-1b
    • Enter a CIDR block of 10.0.2.0/24

    Subnet 3 Settings

  9. Click on Create subnet again and

    • Select VPC A
    • Enter a name of VPC A Private Subnet AZ2
    • Select an Availablity Zone of us-east-1b
    • Enter a CIDR block of 10.0.3.0/24:

    Subnet 4 Settings

  10. After you finish the task, on the resulting Subnets screen

    • Clear the subnet filter
    • Sort by Name
    • Confirm that four new subnets are available with names, CIDR blocks and Availabilty Zones as below

    Subnets Created