Sitemap
Shayla Wright

Shayla Wright

4 min readFeb 28, 2023

--

Creating a VPC in AWS

Press enter or click to view image in full size

Log into your AWS account and click VPC. Here you will choose your VPC type and then create your personal name tag. The CIDR name we will be using is 10.10.0.0/16. After doing this you will click create VPC and begin your project.

Press enter or click to view image in full size

Phase 2
Now you will navigate to Subnets -> Create Subnet. Choose the VPC you just created and then input the IP address range of the 3 new subnets, along with your Zone. Then you will click Create subnet.

Labeled so far we have
VPC1
VPC2
VPC3

Press enter or click to view image in full size

Step 3: Select one of your created subnets, then click Action > Edit subnet settings.

Press enter or click to view image in full size

Step 4: In VPC menu navigate to Internet Gateways and click Create internet gateway. Be sure to name your internet gateway something you will easily remember. I have chosen VPC7_SW.

Press enter or click to view image in full size
Press enter or click to view image in full size
Press enter or click to view image in full size

Phase 2: Create a launch template by Autoscaling .

Step 1: Navigate to the EC2 dashboard. Choose Launch template then click Create a launch template. Chose your name that you personally made for your assignment and then hit create.

Press enter or click to view image in full size

Here you’re going to want to personally name your Launch Template. It is always easy to name everything the same so you wont get lost in the sauce of everything.

Press enter or click to view image in full size

Select Amazon Linux. For the “Instance Type”, select t2.micro since its Free and continue. Remember, we want to always keep those bills down when it comes to AWS!

Press enter or click to view image in full size
Press enter or click to view image in full size

After creating your Key Pair, navigate to “Network Settings”.

Get Shayla Wright’s stories in your inbox

Join Medium for free to get updates from this writer.

Here we are going to select “Create Security Group” and then select the VPC created.

Press enter or click to view image in full size

Under the “Advanced network configuration” we are going to leave all settings as they are but we want to Enable Auto-assign public IP so that our web page will load.

Press enter or click to view image in full size

Next we will scroll down to the “User Data” section all the way at the bottom in Advanced Details and add our script to run our command. Linux seems to follow wherever we go ! We have used this tool many times and its quite handy when completing a project of any kind.

Press enter or click to view image in full size

Step 4: Create an Auto Scaling Group

Next we will auto scale into our EC2 Instance.

Press enter or click to view image in full size
Press enter or click to view image in full size

Next, we will select all of the 3 subnets we previously created to work with and then continue.

Press enter or click to view image in full size

Step 5: Create an Application Load Balancer

Once at this screen, let’s select “Attach to a new load balancer”

Press enter or click to view image in full size

Next, we want to select “attach to a new load balancer and application load balancer”.

Press enter or click to view image in full size
Press enter or click to view image in full size

Now, lets click our instance ID and continue to post our IP Address

Press enter or click to view image in full size

Success!

Press enter or click to view image in full size

In closing, be sure to end all work and delete your load balancer when its not in use.

Press enter or click to view image in full size
Press enter or click to view image in full size

Congratulations ! You have just learned how to create a VPC in AWS!

--

--