SlideShare a Scribd company logo
Three
Tier
Architecture
Project using AWS
by Ayomide Ogunsanya (TheCloudLord)
What is a three-tier
architecture?
A three-tier application is a type of software
architecture that divides an application into three
logical layers: presentation, application (or logic), and
data. Each layer serves a specific purpose and
communicates with the other layers to perform
various functions within the application.
1.
Parts of a three-tier
architecture
Presentation Tier (Front-end)
This layer is responsible for handling user interactions
and displaying information to users.
It includes user interfaces, such as web pages, mobile
apps, or desktop interfaces.
The presentation tier communicates with the
application tier to request and receive data, but it
doesn't directly interact with the data storage.
2.
Parts of a three-tier
architecture
Application Tier (Middle-tier or Logic Tier)
This layer contains the core logic and functionality of the
application.
It processes user requests from the presentation tier,
executes business logic, and interacts with the data tier to
retrieve or update data.
The application tier acts as an intermediary between the
presentation tier and the data tier, ensuring separation of
concerns and modularity.
3.
Parts of a three-tier
architecture
Data Tier (Back-end)
This layer manages the storage and retrieval of data used
by the application.
It typically consists of databases or other data storage
systems.
The data tier stores and organizes data, handles data
retrieval and manipulation requests from the application
tier, and ensures data integrity and security.
4.
Now Lets
Dive Straight
into it!
5.
The
Architectural
Diagram drawn
using Lucid.app
d
6.
On your AWS Console, Search for 'VPC', Click on create VPC.
Now, on the 'VPC Settings' option, select 'VPC and more', go to Name tag option
and put in a VPC name, Lets leave the IPv4 CIDR Block at default for this project
7.
8.
Select [No ipv6 CIDR Block], Leave the [tenancy] at default, in this case we are
using 2 availiability zones which we are going to set as [us-east-1a] and [us-east-1b]
9.
Set [Public Subnet] at 2, [Private Subnets] at 4 which makes a total of 6 subnets for
the 2 availability zones. Now, leave the [NAT Gateway] at none in this case
10.
Now, lets Customize the CIDR ranges using the IPs as shown
11.
Select these Options and click on the create [VPC button] when done.
Now, after VPC Parameters is created, click on the [View VPC] Button
12.
Your VPC should be created like this showing the parameters.
You could also Check the [Resource map] to view your created VPC.
13.
Now, lets enable Auto asign Public IPv4 address in both public subnets, this is
necessary so our application can be accessed publicly. Click on Subnets - Select
Subnet ID - Click on Actions - Select Edit Subnet Settings
14.
Now, Check the Enable auto assign public IPv4 address box -
Scroll Down and Click Save. Now repeat the same action for the
other Public Subnet
15.
Select Internet gateways and confirm it's attached automatically to
your VPC build.
16.
Select Route Tables and confirm it is associated with the public
subnets
17.
Select Route Tables and confirm it is associated with the public
subnets also verify the same for the private subnets.
18.
"We have
Successfully Created
our backbone of the
Architecture !
Now Lets Deploy the
Web Tier"
19.
Now, go to EC2 - Launch Template - Create Launch Template
20.
Now Insert Template name - Template Version description - Check
Auto Scaling Guidiance
21.
Scroll to Application and OS images AMI - Select Amazon Linux -
Select Amazon Linux 2 Free Tier Instance type
22.
Scroll to Instance type - Click rop down arrow - Select t2 micro - Scroll
to key pair login - Select Create new key pair
23.
Type in Keypair name - Click on Create Key Pair
(Make sure you save yo
ur downloaded keypair in a secure place )
24.
Now, lets create our security groups - Scroll to Network Settings - Select Create
Security Groups - Input Name - Input Description - Select our created VPC
25.
Click Add Security Group Rule - Under Type select All ICMP IPv4 - For source
type, we are selecting Anywhere for this project - Now lets add another
Security Group Rule click on it.
26.
Now perform the same procedure but this time setting the type at HTTP. Now
click on add Security Group Rule again for the 3rd one
C
27.
This time set the type to SSH - Click Advance Network Configuration - Click
Add Network Interface
28.
Set Auto-assign public IP to Enable - Scroll down to
Advanced Details and click on it
29.
Now Scroll down to user data and paste the bash script as seen (I'll leave the
Bash script in the N
ext Page, modify as you wish) - Click Launch Template
30.
#!/bin/bash
# get admin privileges
sudo su
# install httpd
yum update -y
yum install -y httpd.x86_64
systemctl start httpd.service
systemctl enable httpd.service
echo "<center><h1><a href='https://www.solavisetech.com/'>Practice
Website</a><h1></center> " > /var/www/html/index.html
31.
Click View Launch Template - Now to your left, Scroll down
to Auto Scaling Groups and Click on it.
32.
Click on create Auto Scaling Group.
33.
Give Auto Scaling Group name -Select your Created Template -
On Version, Select Latest - Scroll down and Click on Next
34.
Scroll down to Network - VPC - Select your Created VPC - On
Avaliability Zones and Subnets, Select all Public subnets - Click Next
35.
Now Click the Hamburger Icon by you left and scroll down to Load
Balancing - Select Target Groups - Click on Create Target Group
36.
Scroll down and input Target Group Name - Select your VPC - Scroll to
the end and Click Next
37.
Scroll down and and click on Create Target Group
38.
On your Left, Scroll down to Load Balancers click on it - Click on
Create Load Balancer
39.
We are using an ALB - Click Create
40.
Now Scroll down - Input ALB Name - Select Your VPC - Select the
Subnet Boxes and ensure they are on public subnets
41.
On Security Groups, Click on Create a New Security Group
42.
Now, Give a Security Group Name - Same as Description - Select your VPC -
Set inbound rules as clicking Add rule - Select Type as indicated and select
source as anywhere IPv4
43.
Click Create Security Group - Now return to your ALB Settings and update the security
group to the just created one NB: if it doesnt come up, refresh with the Refresh Icon
44.
Scroll to Listeners and routing - Select your Created Target Group - Scroll down
and Click Create Load Balancer - Click Veiw Load Balancer to see
45.
Give a few minutes for the provisioning process to be completed for the Load
Balancer to be Active - Go back to youe EC2 - Auto Scaling Groups step 3 and click on
Attach to an existing load balancer View page 33 -35 if you've forgotten the steps
46.
Select your already Existing Load Balancer target group - Turn on Elastic Load
Balancing health checks - Scroll Down and Click Next
47.
Now, Configure the Group Sizes as seen
48.
Set limits on how much your desired capacity can be increased or decreased as seen
- select Target tracking scaling policy
49.
Set limits on how much your desired capacity can be increased or decreased as seen
- select Target tracking scaling policy - Scroll down and Click on Next - Keep clicking next
till you get to the Review Page - At the Review page, scroll down and Click Create auto
scaling group
50.
Now we have our ASG Created Sucessfully. Weldone! Now we have 2 instances running. to
confirm this, go to your EC2 - select instances to view how many instances are running.
51.
You can see the two instances are running - Now Copy the Public IPv4 IP address, create a new
tab on your browser and paste to check if the website loads from the instance. Do the same for
the other instance.
52.
The IP Address Opens up the website - Click on the Link to Open up the Site
53.
Paste the DNS Name in your Browser to access the site through the LB
54.
Now, Lets Create the app tier - Go to EC2 - Launch
template - Enter template name - enter template
version description - Click on Auto Scaling Guidance -
Go to AMI - Select Amazon Linux - Select Amazon Linux
2 free tier - for instance type Select t2 micro - for key
pair, select the existing key pair we created at the
beginning - Click create security group - Give a security
group name - put description - for VPC use the one we
created - Click add security group rule - For type select
Custom ICMP IPv4 - For source type, select Anywhere -
Click on Add security group rule again - this time for
type click on SSH - Source type is Custom - for source,
select your Webtier security group - Click on Create
Launch Template - click launch template
55.
Now, we have our Created App template
56.
Now lets create the Back-end auto scaling Group - Click
on the Hamburger Sign go to Auto scaling group -
input Auto scaling group name - Select Our Launch
template for the App tier - under version click Latest -
Click Next - Now for Network Chose Our VPC - Under
AZ and Subnets, Select (Us east 1a) private 1 subnet and
(Us east 1b) private 2 subnet - Click Next - on Load
Balancing, Click attach to an existing Load Balancer -
for this, lets duplicate our tab, go to Load Balancing -
Target groups - instances - give target group name -
scroll down to VPC and select our VPC - Click on Next
57.
Scroll down and click on Create target group - Now go
to Load Balancer - Click Create Load Balancer - on the
load Balancer type click create button on ALB - input
Load Balancer name - on scheme, select internal - Go to
network mapping and select our VPC - on mappings,
make sure you select the private subnets for the app
tier - Go to security group - click on the create a new
security group link - input name - input description -
select our VPC - click on inbound rules - for type click
HTTP
58.
- for Source select Custom and Search for the Security
group ID of the web tier and select that - CLICK add
rule again - for type click All ICMP IPv4 - for Source
select Custom and Search for the Security group ID of
the web tier and select that
- Scroll down and Click Create Security Group - Go back
to the Application Load Balancer page - on Security
group option click on the refresh icon on the right, now
click the drop down arrow and select our just created
security group for the app tier - on Listeners and
routing go to default action click the drop down arrow
and click on the created target group - Scroll down
amd click on Create Load Balancer
59.
Now lets go to Our Auto Scaling Group Page - existing
load Balancer target groups - click the refresh icon -
click the drop down icon and select our created target
group for the App tier - Enable Health Checks - Click on
Next - Now on Configure group size and scaling policies
- desired capacity 2 - minimum capacity 2 - Maximum
Capacity 4 - Now go to Automatic Scaling - select
Target tracking Scaling policy - Scroll down and Keep
Clicking on Next till you get to the Review page - Scroll
down and click on Create Auto Scaling group - you
should see it successfully created. Now you should See
4 total instances when you go to your EC2 instances.
60. Now lets Create
our Database tier
61.
Now on the AWS Search Bar, Search for RDS - Click on it - click on Subnet Groups first
62.
Now follow the process as seen
63.
Now, for Availability Zones Click us east 1a and us east 1b -
Under Subnets Choose the private subnets assigned for
database tier which on my case is private subnet 3 and 4 -
Now, click Create - Now click on Databases - Click on Create
Database - on the Engine Options select MySQL engine - Scroll
to Template and Click Free Tier option - Scroll down and Give
Database name (DB instance identifier) - scroll down and input
master password - on the instance configuration area, I'll
chose a t2 micro - Scroll down, Enable auto scaling - Change
the VPV to our created VPC - Scroll down to VPC Security
group firewall - click create new - enter VPC Security group
name - Select Availability Zone as us east 1a (the other
automatically acts as a standby) - Scroll down and Click on
Create Database
64.
Now go to your EC2 console go to Security Groups - Locate the Database
Security group - click inbound rules - click edit inbo
und rules
65.
Click on add rule - Set the type to
All traffic - Set the Source to
Custom, search and select out our
Database Security group - Click
Create security group rule.
66.
Now you can test by Pinging any of the private instances through
the public instances using EC2 instance connect, Gitbash etc
67.
Thanks For
Following
Lets Connect
Gmail : ayomideogunsanya@gmail.com
LinkedIn : https://www.linkedin.com/in/thecloudlord/
X : https://twitter.com/TheCloudLord_

More Related Content

PPTX
PDF
What Is Serverless Computing
PPTX
PPTX
Hybridcloud & Multicloud with GCP Anthos.pptx
PPT
Cloud Computing, Social Networking and Social Media
PPTX
DevSecOps
PDF
Highlights of WSO2 API Manager 4.0.0
What Is Serverless Computing
Hybridcloud & Multicloud with GCP Anthos.pptx
Cloud Computing, Social Networking and Social Media
DevSecOps
Highlights of WSO2 API Manager 4.0.0

What's hot (20)

PPTX
ABN AMRO DevSecOps Journey
PDF
Bridging the Security Testing Gap in Your CI/CD Pipeline
PPT
Be project ppt asp.net
PDF
Using OPC-UA to Extract IIoT Time Series Data from PLC and SCADA Systems
PPTX
Serverless computing
PDF
OpenAPI Intro (1).pdf
PDF
SRE Demystified - 05 - Toil Elimination
PDF
Richardson Maturity and OpenAPI 3.0
PDF
Intro to GitHub Actions
PPT
Unit 1-Cloud computing Foundation
PPTX
PPT Azure Firewall vs 3rd Party NVA Comparison v1.0.pptx
PPT
Android Anatomy
PPTX
Postman An Introduction for Testers, October 26 2022.pptx
PDF
Api presentation
PDF
Writing REST APIs with OpenAPI and Swagger Ada
PDF
FIDO2 & Microsoft
PDF
Introduction to API
PDF
Keynote: Elastic Observability evolution and vision
PPTX
API Presentation
ABN AMRO DevSecOps Journey
Bridging the Security Testing Gap in Your CI/CD Pipeline
Be project ppt asp.net
Using OPC-UA to Extract IIoT Time Series Data from PLC and SCADA Systems
Serverless computing
OpenAPI Intro (1).pdf
SRE Demystified - 05 - Toil Elimination
Richardson Maturity and OpenAPI 3.0
Intro to GitHub Actions
Unit 1-Cloud computing Foundation
PPT Azure Firewall vs 3rd Party NVA Comparison v1.0.pptx
Android Anatomy
Postman An Introduction for Testers, October 26 2022.pptx
Api presentation
Writing REST APIs with OpenAPI and Swagger Ada
FIDO2 & Microsoft
Introduction to API
Keynote: Elastic Observability evolution and vision
API Presentation
Ad

Similar to Three Tier Architecture Project Using AWS.pdf (20)

DOCX
Elasticache Lab Report.docx
PDF
Scalable Web Apps - Journey Through the Cloud
PPTX
Scaling horizontally on AWS
PPTX
AWS를 활용한 웹, 모바일, 소셜 애플리케이션 구축 방법
PDF
AWS Training.pdf
PDF
AWS Training.pdf
PPTX
Scalable web apps on AWS - Hebrew Webinar September 2017
PDF
AWS Workshop 101
PDF
Scalable Web Applications Session at Codebase
PPTX
Migrating enterprise workloads to AWS
PPTX
How Easy to Automate Application Deployment on AWS
PPTX
Scalable Web Applications in AWS, 2014
PPTX
Vpc aws meetup
PDF
Aws Architecture Fundamentals
PPTX
SESSION8_AWS how to deploy the resources and services
PDF
DEF CON 24 - Rich Mogull - pragmatic cloud security
PPTX
Cloud Migration, Application Modernization, and Security
PDF
Awsgsg wah-linux
PDF
Awsgsg wah-linux
PPTX
Aws overview part 3(databases, dns and management services)
Elasticache Lab Report.docx
Scalable Web Apps - Journey Through the Cloud
Scaling horizontally on AWS
AWS를 활용한 웹, 모바일, 소셜 애플리케이션 구축 방법
AWS Training.pdf
AWS Training.pdf
Scalable web apps on AWS - Hebrew Webinar September 2017
AWS Workshop 101
Scalable Web Applications Session at Codebase
Migrating enterprise workloads to AWS
How Easy to Automate Application Deployment on AWS
Scalable Web Applications in AWS, 2014
Vpc aws meetup
Aws Architecture Fundamentals
SESSION8_AWS how to deploy the resources and services
DEF CON 24 - Rich Mogull - pragmatic cloud security
Cloud Migration, Application Modernization, and Security
Awsgsg wah-linux
Awsgsg wah-linux
Aws overview part 3(databases, dns and management services)
Ad

Recently uploaded (20)

PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
web development for engineering and engineering
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
composite construction of structures.pdf
PPTX
Geodesy 1.pptx...............................................
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPT
Mechanical Engineering MATERIALS Selection
PDF
Digital Logic Computer Design lecture notes
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Model Code of Practice - Construction Work - 21102022 .pdf
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
web development for engineering and engineering
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
composite construction of structures.pdf
Geodesy 1.pptx...............................................
OOP with Java - Java Introduction (Basics)
Foundation to blockchain - A guide to Blockchain Tech
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Mechanical Engineering MATERIALS Selection
Digital Logic Computer Design lecture notes
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk

Three Tier Architecture Project Using AWS.pdf

  • 1. Three Tier Architecture Project using AWS by Ayomide Ogunsanya (TheCloudLord)
  • 2. What is a three-tier architecture? A three-tier application is a type of software architecture that divides an application into three logical layers: presentation, application (or logic), and data. Each layer serves a specific purpose and communicates with the other layers to perform various functions within the application. 1.
  • 3. Parts of a three-tier architecture Presentation Tier (Front-end) This layer is responsible for handling user interactions and displaying information to users. It includes user interfaces, such as web pages, mobile apps, or desktop interfaces. The presentation tier communicates with the application tier to request and receive data, but it doesn't directly interact with the data storage. 2.
  • 4. Parts of a three-tier architecture Application Tier (Middle-tier or Logic Tier) This layer contains the core logic and functionality of the application. It processes user requests from the presentation tier, executes business logic, and interacts with the data tier to retrieve or update data. The application tier acts as an intermediary between the presentation tier and the data tier, ensuring separation of concerns and modularity. 3.
  • 5. Parts of a three-tier architecture Data Tier (Back-end) This layer manages the storage and retrieval of data used by the application. It typically consists of databases or other data storage systems. The data tier stores and organizes data, handles data retrieval and manipulation requests from the application tier, and ensures data integrity and security. 4.
  • 8. On your AWS Console, Search for 'VPC', Click on create VPC. Now, on the 'VPC Settings' option, select 'VPC and more', go to Name tag option and put in a VPC name, Lets leave the IPv4 CIDR Block at default for this project 7.
  • 9. 8. Select [No ipv6 CIDR Block], Leave the [tenancy] at default, in this case we are using 2 availiability zones which we are going to set as [us-east-1a] and [us-east-1b]
  • 10. 9. Set [Public Subnet] at 2, [Private Subnets] at 4 which makes a total of 6 subnets for the 2 availability zones. Now, leave the [NAT Gateway] at none in this case
  • 11. 10. Now, lets Customize the CIDR ranges using the IPs as shown
  • 12. 11. Select these Options and click on the create [VPC button] when done. Now, after VPC Parameters is created, click on the [View VPC] Button
  • 13. 12. Your VPC should be created like this showing the parameters. You could also Check the [Resource map] to view your created VPC.
  • 14. 13. Now, lets enable Auto asign Public IPv4 address in both public subnets, this is necessary so our application can be accessed publicly. Click on Subnets - Select Subnet ID - Click on Actions - Select Edit Subnet Settings
  • 15. 14. Now, Check the Enable auto assign public IPv4 address box - Scroll Down and Click Save. Now repeat the same action for the other Public Subnet
  • 16. 15. Select Internet gateways and confirm it's attached automatically to your VPC build.
  • 17. 16. Select Route Tables and confirm it is associated with the public subnets
  • 18. 17. Select Route Tables and confirm it is associated with the public subnets also verify the same for the private subnets.
  • 19. 18. "We have Successfully Created our backbone of the Architecture ! Now Lets Deploy the Web Tier"
  • 20. 19. Now, go to EC2 - Launch Template - Create Launch Template
  • 21. 20. Now Insert Template name - Template Version description - Check Auto Scaling Guidiance
  • 22. 21. Scroll to Application and OS images AMI - Select Amazon Linux - Select Amazon Linux 2 Free Tier Instance type
  • 23. 22. Scroll to Instance type - Click rop down arrow - Select t2 micro - Scroll to key pair login - Select Create new key pair
  • 24. 23. Type in Keypair name - Click on Create Key Pair (Make sure you save yo ur downloaded keypair in a secure place )
  • 25. 24. Now, lets create our security groups - Scroll to Network Settings - Select Create Security Groups - Input Name - Input Description - Select our created VPC
  • 26. 25. Click Add Security Group Rule - Under Type select All ICMP IPv4 - For source type, we are selecting Anywhere for this project - Now lets add another Security Group Rule click on it.
  • 27. 26. Now perform the same procedure but this time setting the type at HTTP. Now click on add Security Group Rule again for the 3rd one C
  • 28. 27. This time set the type to SSH - Click Advance Network Configuration - Click Add Network Interface
  • 29. 28. Set Auto-assign public IP to Enable - Scroll down to Advanced Details and click on it
  • 30. 29. Now Scroll down to user data and paste the bash script as seen (I'll leave the Bash script in the N ext Page, modify as you wish) - Click Launch Template
  • 31. 30. #!/bin/bash # get admin privileges sudo su # install httpd yum update -y yum install -y httpd.x86_64 systemctl start httpd.service systemctl enable httpd.service echo "<center><h1><a href='https://www.solavisetech.com/'>Practice Website</a><h1></center> " > /var/www/html/index.html
  • 32. 31. Click View Launch Template - Now to your left, Scroll down to Auto Scaling Groups and Click on it.
  • 33. 32. Click on create Auto Scaling Group.
  • 34. 33. Give Auto Scaling Group name -Select your Created Template - On Version, Select Latest - Scroll down and Click on Next
  • 35. 34. Scroll down to Network - VPC - Select your Created VPC - On Avaliability Zones and Subnets, Select all Public subnets - Click Next
  • 36. 35. Now Click the Hamburger Icon by you left and scroll down to Load Balancing - Select Target Groups - Click on Create Target Group
  • 37. 36. Scroll down and input Target Group Name - Select your VPC - Scroll to the end and Click Next
  • 38. 37. Scroll down and and click on Create Target Group
  • 39. 38. On your Left, Scroll down to Load Balancers click on it - Click on Create Load Balancer
  • 40. 39. We are using an ALB - Click Create
  • 41. 40. Now Scroll down - Input ALB Name - Select Your VPC - Select the Subnet Boxes and ensure they are on public subnets
  • 42. 41. On Security Groups, Click on Create a New Security Group
  • 43. 42. Now, Give a Security Group Name - Same as Description - Select your VPC - Set inbound rules as clicking Add rule - Select Type as indicated and select source as anywhere IPv4
  • 44. 43. Click Create Security Group - Now return to your ALB Settings and update the security group to the just created one NB: if it doesnt come up, refresh with the Refresh Icon
  • 45. 44. Scroll to Listeners and routing - Select your Created Target Group - Scroll down and Click Create Load Balancer - Click Veiw Load Balancer to see
  • 46. 45. Give a few minutes for the provisioning process to be completed for the Load Balancer to be Active - Go back to youe EC2 - Auto Scaling Groups step 3 and click on Attach to an existing load balancer View page 33 -35 if you've forgotten the steps
  • 47. 46. Select your already Existing Load Balancer target group - Turn on Elastic Load Balancing health checks - Scroll Down and Click Next
  • 48. 47. Now, Configure the Group Sizes as seen
  • 49. 48. Set limits on how much your desired capacity can be increased or decreased as seen - select Target tracking scaling policy
  • 50. 49. Set limits on how much your desired capacity can be increased or decreased as seen - select Target tracking scaling policy - Scroll down and Click on Next - Keep clicking next till you get to the Review Page - At the Review page, scroll down and Click Create auto scaling group
  • 51. 50. Now we have our ASG Created Sucessfully. Weldone! Now we have 2 instances running. to confirm this, go to your EC2 - select instances to view how many instances are running.
  • 52. 51. You can see the two instances are running - Now Copy the Public IPv4 IP address, create a new tab on your browser and paste to check if the website loads from the instance. Do the same for the other instance.
  • 53. 52. The IP Address Opens up the website - Click on the Link to Open up the Site
  • 54. 53. Paste the DNS Name in your Browser to access the site through the LB
  • 55. 54. Now, Lets Create the app tier - Go to EC2 - Launch template - Enter template name - enter template version description - Click on Auto Scaling Guidance - Go to AMI - Select Amazon Linux - Select Amazon Linux 2 free tier - for instance type Select t2 micro - for key pair, select the existing key pair we created at the beginning - Click create security group - Give a security group name - put description - for VPC use the one we created - Click add security group rule - For type select Custom ICMP IPv4 - For source type, select Anywhere - Click on Add security group rule again - this time for type click on SSH - Source type is Custom - for source, select your Webtier security group - Click on Create Launch Template - click launch template
  • 56. 55. Now, we have our Created App template
  • 57. 56. Now lets create the Back-end auto scaling Group - Click on the Hamburger Sign go to Auto scaling group - input Auto scaling group name - Select Our Launch template for the App tier - under version click Latest - Click Next - Now for Network Chose Our VPC - Under AZ and Subnets, Select (Us east 1a) private 1 subnet and (Us east 1b) private 2 subnet - Click Next - on Load Balancing, Click attach to an existing Load Balancer - for this, lets duplicate our tab, go to Load Balancing - Target groups - instances - give target group name - scroll down to VPC and select our VPC - Click on Next
  • 58. 57. Scroll down and click on Create target group - Now go to Load Balancer - Click Create Load Balancer - on the load Balancer type click create button on ALB - input Load Balancer name - on scheme, select internal - Go to network mapping and select our VPC - on mappings, make sure you select the private subnets for the app tier - Go to security group - click on the create a new security group link - input name - input description - select our VPC - click on inbound rules - for type click HTTP
  • 59. 58. - for Source select Custom and Search for the Security group ID of the web tier and select that - CLICK add rule again - for type click All ICMP IPv4 - for Source select Custom and Search for the Security group ID of the web tier and select that - Scroll down and Click Create Security Group - Go back to the Application Load Balancer page - on Security group option click on the refresh icon on the right, now click the drop down arrow and select our just created security group for the app tier - on Listeners and routing go to default action click the drop down arrow and click on the created target group - Scroll down amd click on Create Load Balancer
  • 60. 59. Now lets go to Our Auto Scaling Group Page - existing load Balancer target groups - click the refresh icon - click the drop down icon and select our created target group for the App tier - Enable Health Checks - Click on Next - Now on Configure group size and scaling policies - desired capacity 2 - minimum capacity 2 - Maximum Capacity 4 - Now go to Automatic Scaling - select Target tracking Scaling policy - Scroll down and Keep Clicking on Next till you get to the Review page - Scroll down and click on Create Auto Scaling group - you should see it successfully created. Now you should See 4 total instances when you go to your EC2 instances.
  • 61. 60. Now lets Create our Database tier
  • 62. 61. Now on the AWS Search Bar, Search for RDS - Click on it - click on Subnet Groups first
  • 63. 62. Now follow the process as seen
  • 64. 63. Now, for Availability Zones Click us east 1a and us east 1b - Under Subnets Choose the private subnets assigned for database tier which on my case is private subnet 3 and 4 - Now, click Create - Now click on Databases - Click on Create Database - on the Engine Options select MySQL engine - Scroll to Template and Click Free Tier option - Scroll down and Give Database name (DB instance identifier) - scroll down and input master password - on the instance configuration area, I'll chose a t2 micro - Scroll down, Enable auto scaling - Change the VPV to our created VPC - Scroll down to VPC Security group firewall - click create new - enter VPC Security group name - Select Availability Zone as us east 1a (the other automatically acts as a standby) - Scroll down and Click on Create Database
  • 65. 64. Now go to your EC2 console go to Security Groups - Locate the Database Security group - click inbound rules - click edit inbo und rules
  • 66. 65. Click on add rule - Set the type to All traffic - Set the Source to Custom, search and select out our Database Security group - Click Create security group rule.
  • 67. 66. Now you can test by Pinging any of the private instances through the public instances using EC2 instance connect, Gitbash etc
  • 68. 67. Thanks For Following Lets Connect Gmail : ayomideogunsanya@gmail.com LinkedIn : https://www.linkedin.com/in/thecloudlord/ X : https://twitter.com/TheCloudLord_