Create role for EC2:

Creating VPC:
VPC is created to have a virtual private cloud which is used to keep our cloud network separate from other cloud networks.

Creating Subnets:
Since the 3tier atchitecture has 3 sunets in 2 AZs so we need to create 6 subnets. In each AZ we need to create 2 private subnet and one public subnet.

Creating Internet Gateway:
In order to have communication with the internet we must have an internet gateway.

Creating NAT gateways:
NAT gateway is created in public subnets and it helps the private subnet to connect with the internet.

Creating Route Tables:
Route tables are tables that define the route between services.
This helps the data in a specified path.
Create Route tables and edit the routes accordingly and associate the subnets.

Creating security groups:

Creating subnet group for database:

creating database:

Creating EC2 instances:
Creating connection with DB:

Inserting data in the database:

Creating a bucket and uploading objects:

Downloading the s3 objects in the machine

Creating an Image

Creating a target group:

Creating internal load balancer:

Launch template creation:

Creating a Auto scaling group:

Creating a WebTier instance:

Uploading the files and accessing:
After creating webtier instance now we are accessing the web tier in the server


Creating target group for Internet facing load balancer

Creating a Internet facing load balancer

Creating launch template for WebTier

Creating Auto Scaling group for Webtier
