VPC Creation Using VPC Wizard Scenario 2

Scenario 2: VPC with the Public and Private Subnet

In this scenario, we are going to create VPC with single public subnet using VPC Wizard.

1. Go to VPC Dashboard on AWS Web Console and click on Start VPC Wizard.


2. Choose VPC with public and private subnet and then choose select.



3. Provide the details for creating VPC as follows.

IPv4 CIDR block: 10.0.0.0/16 (Default AWS provide CIDR block as 10.0.0.0/16).

IPv6 CIDR block: No (Default it is selected as NO).

VPC name: Pranav-VPC2 (Provide VPC Name as you like).

Public subnet's IPv4 CIDR: 10.0.1.0/24 (This will provide the public CIDR block range).

Availability Zone: us-east-1a (Select the availability zone as you like or let AWS will decide).

Public subnet name: Public-1a (Provide subnet name).

Private subnet's IPv4 CIDR: 10.0.2.0/24 (This will provide the public CIDR block range).

Availability Zone: us-east-1b (Select the availability zone as you like or let AWS will decide).

Subnet name: Public-1b (Provide subnet name).

Specify the allocation ID for an Elastic IP address in your account, for NAT gateway.

Enable DNS hostnames: Yes (Default it is selected as yes so that instances can be accessed using DNS hostname).

Hardware tenancy: Default 

After providing all the details click on Create VPC. Within few seconds you have VPC created as per your requirement.


4. Enable Auto assign Public IP for public subnet.

By default the subnet which is created will have “Auto assign public IP” attribute set to No, This is because the subnet is non default subnet created using VPC Wizard.



In order to access the instances launched into the Public Subnet must have public IP assigned to it. To enable “Auto assign public IP” attribute we need to modify the auto-assign IP settings.

Under VPC dashboard, in navigation pane choose Subnets.

Select your subnet and choose Subnet Actions, Modify auto-assign IP settings.
Click on check box to select and then press save.




Important Points:
1. In this scenario, after creating VPC using VPC wizard, AWS will create two subnets, public and private, Internet Gateway (IGW) that allows instances in public subnet to communicate with the internet and other AWS services and NAT Gateway with its own Elastic IP address allows the instances in private subnet to connect to the internet.
2. It creates two route tables:
  One is the Main Route table associated with private subnet which has local route that allows the instances to communicate within VPC and second route allows instances in private subnet to connect to the internet through NAT Gateway.
  Second is Custom (No Main) associated with public subnet which have two routes added to it. One which allows instances to communicate within VPC and other one has route that allows instances to communicate with internet through internet gateway (IGW).
3. Public subnet created using VPC wizard is the non-default subnet, having “Auto-assign Public IP” and “Auto-assign IPv6 address” attributes set to NO (false).

VPC Creation Using VPC Wizard Scenario 1

VPC with a Single Public Subnet

Under VPC Wizard we have 4 options available to us and those are:
1. VPC with a Single Public Subnet
2. VPC with Public and Private Subnets
3. VPC with Public and Private Subnets and Hardware VPN Access
4. VPC with a Private Subnet Only and Hardware VPN Access

In this scenario, we are going to create VPC with single public subnet using VPC Wizard.

1. Go to VPC Dashboard on AWS Web Console and click on Start VPC Wizard.


2. Choose VPC with a single public subnet and then choose select.



3. Provide the details for creating VPC as follows

IPv4 CIDR block: 192.168.0.0/16 (Default AWS provide CIDR block as 10.0.0.0/16).

IPv6 CIDR block: No (Default it is selected as NO).


VPC name: Pranav-VPC1 (Provide VPC Name as you like).

Public subnet's IPv4 CIDR: 192.168.1.0/24 (This will provide the public CIDR block range).

Availability Zone: us-east-1a (Select the availability zone as you like or let AWS will decide).

Subnet name: Pranav-VPC1-Public Sub (Provide subnet name).

Enable DNS hostnames: Yes (Default it is selected as yes so that instances can be accessed using DNS hostname).

Hardware tenancy: Default


After providing all the details click on Create VPC. Within few seconds you have VPC created as per your requirement.




4. Enable Auto assign Public IP.
By default the subnet which is created will have “Auto assign public IP” attribute set to NO, This is because the subnet is non-default subnet created using VPC Wizard.



In order to access the instances launched into the Public Subnet must have public IP assigned to it. To enable “Auto assign public IP” attribute we need to modify the auto-assign IP settings.
Under VPC dashboard, in navigation pane choose Subnets.
Select your subnet and choose Subnet Actions, Modify auto-assign IP settings.
Click on the check box to select and then press save.




Important Points:
1. In this scenario, after creating VPC using VPC wizard, AWS will create Internet Gateway (IGW) that allows instances in public subnet to communicate with the internet and other AWS services.
2. It creates two route tables:
  One is the Main Route table which has a local route that allows the instances to communicate within VPC and it has no subnet associated with it.
  Second is Custom (No Main) which have two routes added to it. One which allows instances to communicate within VPC and other one has a route that allows instances to communicate with internet through internet gateway (IGW).
 Custom (No Main) route table has one subnet associated with it.
3. Subnet created using VPC wizard is the non-default subnet, having “Auto-assign Public IP” and “Auto-assign IPv6 address” attributes set to NO (false).