A three-tier architecture provides a general framework for organizing traditional client/server applications into three logical tiers: the Web tier, the Application tier, and the Database tier. End users interact with the Web tier (for example: mobile apps, websites…), which provides the interface for users to view, modify, or submit information. The Application tier is responsible for processing user requests, translating user actions into business logic so that programs can process the data. Finally, the Database tier (Data tier) is where the information processed by the application is stored and managed.
The cfn-aws-three-tier-demo.yaml template creates the entire architecture below. The main parameters are EnvironmentName, KeyPair, DatabaseName, MasterUsername, MasterUserPassword, SSHLocation, LatestAmiId, and the CIDR ranges of the VPC and subnets.
PublicSubnet1, PublicSubnet2) associated with the public route table, reaching the Internet through the Internet Gateway.t3.micro running Amazon Linux 2023, bootstrapped with a static web page that shows the instance’s Availability Zone.PublicSubnet1 so that private subnets can reach the Internet.PrivateSubnet1, PrivateSubnet2) associated with the private route table, reaching the Internet through the NAT Gateway.t3.micro.PrivateSubnet3, PrivateSubnet4) associated with the private route table.db.t3.small) with a Multi-AZ standby instance.PublicSubnet3) associated with the public route table.t3.micro with nmap and the MySQL client (mariadb105) preinstalled.SSHLocation parameter.BastionHostPIP: the public IP address of the Bastion Host.WebTierLoadBalancerURL: the DNS name of the Web Tier Application Load Balancer.AppTierLoadBalancerURL: the DNS name of the Application Tier Application Load Balancer.MySQLDatabaseEndpointAddress: the endpoint of the RDS database.MySQLDatabasePort: the port of the database.