Create VPC & Subnets

In this part, we are going to setup a VPC where we will be able to host our QR Code App. This will include public subnets with an internet gateway, and private subnet that can't be accessed over the internet.

We're going to end up with a VPC that looks something like this:

VPC Diagram VPC Diagram

We're going to have two subnets for each part of the application.

  • Two public subnets for the application load balancer
  • Two private subnets for the application servers
  • Two private subnets for the database

This could be a different number of subnets, but we want to have at least two availability zones for redundancy.

VPC Diagram VPC Diagram

So each part of the application will be able to exist in two different availability zones. In a real production application, we would probably want to have more, but this is good for now.

Once we've setup the VPC and subnets, we'll deploly the three tier application like this:

VPC Diagram VPC Diagram

We will have to manually manage the load balancer and application servers, but the database will be managed by RDS. Again, in production we would let RDS replicate the database across multiple availability zones. Since we're using the free tier, it will only create a single instance in one AZ, but we'll still create two AZs for it to choose from.

In the next section we will also look at auto scaling groups and application load balancers to manage the other parts of the infrastructure for us, but for now, we'll just set those up manually.

VPC

Let's start by setting up a brand new custom VPC.

step 1:

Navigate to the VPC console and click on Create VPC

Navigate to the VPC console and click on **Create VPC**
step 2:

Give your VPC a name

Give your VPC a name
step 3:

Use the CIDR block "10.0.0.0/16"

Use the CIDR block "10.0.0.0/16"
Cloud Course
Cloud Course
$89.70
$299.00 Lifetime
  • 81+ learning resources
  • 57 lessons and tutorials
  • 15 hands-on deployments
  • 9 quizzes
  • 29 videos (4h 17m 38s)
  • More content coming soon
  • Unlimited lifetime access to all course content
  • Deployment assessment CLI tool
  • Exclusive Discord access
Original Price:$299.00
Discount:-$209.30
Total:$89.70