Skip to content

Infrastructure as Code (IaC) project using Terraform to deploy a 3-tier AWS architecture with ALB, private EC2, and RDS.

Notifications You must be signed in to change notification settings

samidha1-1/aws-terraform-nginx-3tier

Repository files navigation

Terraform AWS 3-Tier Architecture

Overview

This project provisions a secure and highly available 3-tier architecture on AWS using Terraform. The application layer is deployed in private subnets and exposed securely via an Application Load Balancer (ALB).

NGINX is installed on private EC2 instances and accessed from a browser through the ALB.


Architecture

Request Flow:

User → ALB (Public Subnet) → EC2 (Private Subnet) → RDS


Architecture Diagram

Architecture-diagram


AWS Components

  • VPC
  • Public & Private Subnets
  • Route Tables
  • Internet Gateway
  • NAT Gateway
  • Application Load Balancer (ALB)
  • EC2 Instances (Private Subnet)
  • NGINX Web Server
  • RDS (Database Layer)
  • Security Groups

Tools & Technologies

  • Terraform (Infrastructure as Code)
  • AWS (VPC, EC2, ALB, RDS)
  • NGINX
  • Linux

🌐 Application Access

NGINX via ALB


Security Best Practices

  • EC2 instances deployed in private subnets
  • No direct public access to EC2
  • Traffic allowed only through ALB
  • Restricted access using Security Groups
  • Terraform state and sensitive files excluded via .gitignore

Deployment

terraform init
terraform plan
terraform apply

About

Infrastructure as Code (IaC) project using Terraform to deploy a 3-tier AWS architecture with ALB, private EC2, and RDS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published