Part1: Deploying an application in a VPC

Part1: Deploying an application in a VPC

Creating a VPC in AWS

·

2 min read

Hello readers!

This blog will be a series as we learn how to deploy a Python server in a VPC

The steps involved in this will be as follows:

  1. Creating a VPC that is highly available and scalable

  2. Deploying EC2 instances in the Private subnet of VPC through a launch template and attaching auto-scaling group to them

  3. Connecting to the instances in the Private subnet via Bastion Host

  4. Deploying the server in a Private subnet and accessing then through a Load balancer

In today's blog, we will be creating a VPC with public and private subnets.

  1. Search for VPC in the search bar of the AWS console, click on VPC

  2. Once you land on the VPC home page, select "Create VPC "

  3. You should now be on the VPC settings page where you will make the below settings

    1. Select VPC and more- when you select this option, AWS automatically creates the required subnets, gateways and DNS for you with some basic information

    2. Next, select the VPC name as per your preference

    3. Select the IP address range as you wish

  4. We shall create VPCs in 2 Availability Zones for high availability.

  5. Select 1 public and private subnet per subnet

  6. Select 1 NAT gateway per Availability Zone

  7. We will not be using any endpoints in our VPC

  8. Now, click on create VPC and the VPC starts creating

  9. Once you do the above settings, click on View VPC. You can check the Resource map in the bottom and it should look something like the one below:

VPC is successfully set up with Public and Private Subnets. In the next blog, we shall learn how to deploy scalable EC2 instances in these subnets via Launch template .