Day 22 - Deploying an RDS MySQL Web Application Stack with Terraform Modules
Introduction For Day 22 of my 30 Days of AWS Terraform challenge, I built a small but complete web application stack using Terraform modules. The goal of this mini project was to deploy a Flask web application on an EC2 instance and connect it securely to an RDS MySQL database running in private subnets. This project helped me understand how a real application stack is usually separated into networking, compute, database, and security layers. Architecture The architecture includes: VPC with public and private subnets EC2 instance in the public subnet RDS MySQL database in private subnets Security groups controlling traffic between EC2 and RDS Internet Gateway for public access to the web server This diagram should show users accessing the EC2 Flask application through the internet, while the EC2 instance connects privately to RDS MySQL. Terraform Module Structure I used a modular Terraform structure instead of putting everything into one large main.tf file. The project ...