- This project is a hands-on implementation of a 3-tier architecture using Amazon Web Services (AWS).
- It demonstrates how to set up a web-based Student Management System using core cloud components including a web server (NGINX), application server (Apache Tomcat), and database server (MySQL).
Three-tier Architecture Components:
-
Presentation Layer (Web Tier):
- NGINX server hosted on an EC2 instance
- Handles incoming HTTP requests and forwards them to the application layer
-
Application Layer (App Tier):
- Apache Tomcat on EC2
- Processes logic and handles user requests
-
Database Layer (DB Tier):
- MySQL database running on a private EC2 instance
- Stores student data
- EC2 β for hosting all three tiers
- VPC β with public and private subnets
- Internet Gateway & Route Tables β for internet access
- Security Groups & NACLs β for fine-grained access control
- Elastic IP β for static access to the web server
- SSH β for instance provisioning and setup
-
VPC Configuration
- Create a custom VPC with CIDR block
- Configure public and private subnets
- Set up internet gateway and routing tables
-
Security Setup
- Define security groups for each layer:
- Web: Allow HTTP/HTTPS and SSH
- App: Allow traffic from Web tier only
- DB: Allow traffic from App tier only
- Define security groups for each layer:
-
Server Deployment
- Launch EC2 instances for each layer
- Install necessary services:
- NGINX on Web tier
- Java & Tomcat on App tier
- MySQL on DB tier
-
App Configuration
- Deploy the Student Management App on Tomcat
- Configure NGINX reverse proxy to point to the App tier
- Connect Tomcat to MySQL with JDBC driver and correct credentials
Currently, the application UI loads but the data is not being stored in the MySQL database. Possible causes:
- Incorrect JDBC connection string
- MySQL port not open to the App server
- DB credentials mismatch
To Fix: Ensure security groups allow DB port (3306) from the App server and the JDBC config in
web.xmlis correct.
- How to architect and deploy a 3-tier application on AWS
- Hands-on experience with EC2, VPC, Subnets, and Security Groups
- Configuration of NGINX, Tomcat, and MySQL in a cloud environment
- Understanding of private and public IP, EIP, NAT vs IGW
AWS EC2 VPC NGINX Tomcat MySQL Linux Bash SSH Cloud Networking Web App Deployment
Tejaswini Shirke
GitHub: Tejaswini2704



