Create the Virtual Private Cloud

 

Creating the VPC

To create the VPC, in the AWS CLI, run the following command:

# aws ec2 create-vpc \
--cidr-block <CIDR allocated for new VPC> \
| jq -r '.Vpc.VpcId'

The command will return the new VPC's VPC ID. Record the VPC ID and VPC CIDR to the AWS worksheet.

For example below is an input and output:

# aws ec2 create-vpc \
--cidr-block 10.0.0.0/16 \
| jq -r '.Vpc.VpcId'
vpc-0143197ca9bd9c117

Tagging the VPC

The new VPC is required to have the following identifying tags:

Enabling DNS and Hostname Resolution

DNS support and hostname resolution should be enabled to make IP addresses more easily human-readable.

Next Step: Create the External IP Address