Skip to content

Latest commit

 

History

72 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

3-Tier Web Application on AWS 🚀

AWS Infrastructure as Code Built with Flask Database Deployed License

📚 Table of Contents

This project demonstrates a fully functional 3-tier web application infrastructure deployed on AWS using CloudFormation.

Architecture Overview

Web App Backend Architecture Diagram

 [Web Tier - Public EC2 with Apache]
                  |
 [App Tier - Private EC2 with Flask]
                  |
 [Database Tier - RDS MySQL in Private Subnet]

✅ Project Status

  • ✅ Database Tier (RDS) deployed successfully
  • ✅ App Tier (Flask App) EC2 instance configured
  • ✅ Web Tier (Apache) EC2 instance live with HTML page
  • ⏳ Reverse Proxy from Apache to Flask App

📁 Project Structure

cloudformation-templates/
├── db-tier.yaml
├── app-tier.yaml
└── web-tier.yaml

assets/
├── architecture/
│   └── architecture.png
└── screenshots/
    └── screenshot.png

🔧 Technologies Used

  • AWS CloudFormation
  • Amazon EC2
  • Amazon RDS (MySQL)
  • Flask (Python Web Framework)
  • Apache Web Server (httpd)

📌 Prerequisites

  • AWS CLI Configured
  • Valid SSH Key Pair (e.g., bus.key on your local machine)
  • Python 3 & Flask installed (for App Tier)

🧪 Testing

To test the app end-to-end:

  1. SSH into the Web Tier:

    ssh -i ~/Desktop/ec2-key ec2-user@<Web-Tier-Public-IP>
  2. Confirm Apache is running:

    curl http://localhost
  3. Set up reverse proxy to App Tier (Private IP on port 8080) by editing the Apache config:

    sudo nano /etc/httpd/conf.d/proxy.conf
  4. Access from browser:

    http://<Web-Tier-Public-IP>

📸 Deployment Screenshots

📌RDS Tier –Database Layer

This section captures the deployment of the Database Tier using AWS CloudFormation. The screenshots include the RDS MySQL instance creation process, event logs, output values, deployed resources, and the associated CloudFormation template.

⚙App Tier –Backend Flask API

These screenshots highlight the Application Tier deployment. You’ll see the creation of the private EC2 instance running a Flask application, the CloudFormation template used, and the testing process to confirm backend functionality.

🌐Web Tier –Apache Frontend

This section showcases the Web Tier, where a public EC2 instance is launched and configured with Apache. The images demonstrate the deployment events, resources created, and successful integration with the other tiers.

📌 Notes

  • Use python3 -m http.server 8080 on App Tier for quick testing

🔜 Upcoming Enhancements

Enable HTTPS with Let's Encrypt Use Route 53 for DNS management Add Auto Scaling & Load Balancing


Contributions welcome! ⭐

Author: Emma – AWS Junior Solution Architect

LinkedIn
License: MIT


About

A 3-Tier Web Application using AWS EC2, RDS, and CloudFormation. Deploys a Flask-based application with a secure web tier.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors