How to Setup a VPC with Public and Private Subnets In AWS
In AWS, VPC stands for Virtual Private Cloud which allows for a person to run AWS services within a virtual network you define.
1)Login into the console at https://console.aws.amazon/vpc/
2)Make note of the region /availability zone during the setup because other services will be dependent on it.
3) Select the VPC dashboard then launch Start VPC Wizard.
4)Select from the side menu the VPC with Public and Private Subnets.(There are other options available)
5)Create a /16(i.e. 10.0.0.0/16) IPv4 CIDR Block for the VPC and then each subnet will work on /24
6)Enter a name for the VPC. i.e Demo 1
7) Enter your CIDR Public subnet address based on /24 ie 10.0.1.0/24
8)Select your Availability Zone
9)Enter a name for the Public Subnet
10) Enter your CIDR Private subnet address based on /24 ie 10.1.1.0/24
11) Select your Availability Zone
12) Enter a name for the Private subnet
13) Enter your Elastic IP Allocation ID:( This will be used with your NAT Gateway)
14)Enable DNS hostnames (yes)
15)There are additional items you can select but the above items should be enough for now.
16)Select Create your VPC Button