AWS Builder Center
Building a Secure 3-Tier Web Application on AWS: A Capstone Journey

Building a Secure 3-Tier Web Application on AWS: A Capstone Journey

How I designed and deployed a production-style 3-tier architecture on AWS — covering VPC networking, EC2, RDS, Auto Scaling, and IAM — with the database completely isolated from the public internet.

AWS Cloud Engineer | DevOps Enthusiast | Linux • Docker • Kubernetes • Jenkins • Ansible • Terraform

Introduction

As the capstone project for my Cloud Computing course, I designed, secured, and deployed a full 3-tier web application on AWS — integrating everything from networking to serverless computing into one production-style environment. This article walks through the architecture and the key design decisions behind it.

Architecture Overview

The application follows a classic 3-tier model:
  • Presentation/Web Tier — A fleet of EC2 instances running Apache and PHP, sitting behind an Application Load Balancer and managed by an Auto Scaling Group.
  • Application Logic — Handled within the web tier itself, with supplementary serverless logic via AWS Lambda and API Gateway for event-driven tasks.
  • Data Tier — An Amazon RDS (MySQL) instance, placed entirely inside private subnets with no public IP and no route to the internet.

Key Design Decisions

1. Network isolation by design, not convention. The VPC was built with public and private subnets across multiple Availability Zones. Only the web tier sits in the public subnets; the database subnet group has zero internet gateway route. This means even if application-layer credentials were ever compromised, there is no network path from the public internet directly to the database.
2. Security groups as the real firewall. Rather than relying on broad CIDR-based rules, the RDS security group only accepts inbound MySQL/Aurora traffic (port 3306) from the web tier's specific security group ID — not from an IP range. This scopes access to "instances that are part of this application," not "anyone who guesses
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article