GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - githubWithGHANA/aws-3tier-webapp: This repository demonstrates a 3‑tier web application on AWS, built for scalability and modular design. It consists of a Web Tier (Nginx + Node.js), Application Tier (Node.js + Internal Load Balancer), and Database Tier (Amazon RDS MySQL).

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
3tier-app-deployment-aws-main
3tier-app-deployment-aws-main
 
 
screenshots
screenshots
 
 
README.md
README.md
 
 

Repository files navigation

3-Tier Architecture Application Deployment on AWS

πŸ“– Overview

This repository documents the deployment of a 3-tier architecture on AWS, consisting of:

  • Web Tier (Nginx + Node.js)
  • Application Tier (Node.js + Internal Load Balancer)
  • Database Tier (Amazon RDS MySQL)

The setup ensures scalability, security, and high availability using VPC, Security Groups, Load Balancers, Auto Scaling Groups, and Route53.


πŸ“‚ Repository Structure

aws-blue-green-deployment/
|
β”œβ”€β”€ 3tier-app-deployment-aws-main/
β”‚     β”œβ”€β”€ application-code
β”‚           β”œβ”€β”€ apptier/
β”‚           β”œβ”€β”€ webtier/
β”œβ”€β”€ install.sh
β”œβ”€β”€ screenshots/
β”‚   β”œβ”€β”€ Images
β”œβ”€β”€ README.md
└── architecture.png

πŸ—οΈ Architecture

  • VPC: Custom VPC (CIDR: 192.168.0.0/16) with 2 public and 4 private subnets.
  • Security Groups: Separate SGs for Web ALB, Web Server, App ALB, App Server, and Database.
  • Storage: S3 private bucket for application code and configuration files.
  • IAM: Role for EC2 with SSM permissions.
  • Database: RDS MySQL instance with private subnet group.
  • App Tier: Node.js application servers behind an internal ALB.
  • Web Tier: Nginx servers behind an external ALB with HTTPS via ACM.
  • Scaling: Auto Scaling Groups for both Web and App tiers.
  • DNS: Route53 for domain mapping.

πŸš€ Deployment Steps

1. Networking

  • Create VPC: 192.168.0.0/16
  • Subnets: 2 public, 4 private
  • NAT Gateway in one AZ
  • Security Groups:
    • Web ALB SG β†’ allow HTTP/HTTPS from 0.0.0.0/0
    • Web SG β†’ allow traffic from Web ALB SG
    • App ALB SG β†’ allow traffic from Web SG
    • App SG β†’ allow TCP 4000 from App ALB SG
    • DB SG β†’ allow MySQL (3306) from App SG

2. Storage

  • Create S3 bucket: 3-tier-project-demo
  • Upload application code and install.sh
  • Update configs:
    • DbConfig.js β†’ RDS credentials
    • nginx.conf β†’ Internal ALB DNS

3. IAM

  • Create role: 3-tier-role
  • Trusted entity: EC2
  • Permissions: AmazonEC2RoleforSSM

4. Database

  • Create DB Subnet Group (tier-Subnet-Group)
  • Launch RDS MySQL instance (my3tierdb)
  • Update App Tier config with DB endpoint and credentials

5. Application Tier

  • Launch EC2 (Amazon Linux 2/2023, t2.micro) in private subnet
  • Attach IAM role
  • Connect via SSM
  • Install Node.js, PM2, MySQL client
  • Deploy app from S3
  • Configure internal ALB + target group (port 4000, health check /health)

6. Web Tier

  • Launch EC2 (Amazon Linux 2/2023, t2.micro) in public subnet
  • Install Node.js, Nginx
  • Deploy web code from S3
  • Replace default nginx.conf with custom config
  • Configure external ALB + target group (port 80, health check /)

7. HTTPS & DNS

  • Create ACM certificate
  • Attach certificate to external ALB listener
  • Configure Route53 domain: https://3tier-webapp.com

8. Auto Scaling

  • Create AMIs for App and Web servers
  • Define Launch Templates
  • Create ASGs with min/max/desired capacity
  • Attach respective ALBs

πŸ› οΈ Usage

Once deployed:

  • Access the application via the Route53 domain.
  • Web tier forwards requests to App tier through internal ALB.
  • App tier communicates with RDS MySQL database.

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/new-feature)
  3. Commit changes (git commit -m 'Add new feature')
  4. Push to branch (git push origin feature/new-feature)
  5. Open a Pull Request

πŸ“œ License

This project is licensed under the MIT License.

About

This repository demonstrates a 3‑tier web application on AWS, built for scalability and modular design. It consists of a Web Tier (Nginx + Node.js), Application Tier (Node.js + Internal Load Balancer), and Database Tier (Amazon RDS MySQL).

Topics

awscloudfrontec2iamload-balancernginxrds-mysqls3-bucketvpc

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Packages

Contributors

Languages

You are visitor 01402775 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.