Posts

Day 24 - Highly Available and Scalable Django Application on AWS using Terraform

Image
Today I worked on deploying a highly available and scalable Django application on AWS using Terraform. The goal of this project was to understand how production-style AWS infrastructure is designed across multiple Availability Zones while keeping the application secure, scalable, and resilient. Instead of deploying a single EC2 instance in a public subnet, this setup used private EC2 instances behind an Application Load Balancer. The infrastructure also included Auto Scaling Groups, NAT Gateways, route tables, security groups, and multi-AZ networking. Architecture Overview The infrastructure was deployed inside a custom VPC across two Availability Zones. Main components used: VPC with public and private subnets Internet Gateway NAT Gateways for outbound internet access Application Load Balancer Private EC2 instances Auto Scaling Group Dockerized Django application Terraform Infrastructure as Code VPC and Networking Design The VPC CIDR block used was: 10.0.0.0/...

Day 23 - Building S3 Security & Operations Monitoring using Terraform, CloudTrail, CloudWatch and SNS

Image
For Day 23 of my AWS Terraform journey, I built a security monitoring solution for Amazon S3 using Terraform modules. The goal of this project was to monitor S3 object-level activity, detect suspicious access patterns, and send email alerts automatically using native AWS services. This project uses: Amazon S3 AWS CloudTrail Amazon CloudWatch Logs CloudWatch Metric Filters CloudWatch Alarms Amazon SNS Terraform Modules Project Objective The monitoring solution performs the following: Creates a monitored S3 bucket with a random suffix Captures S3 object-level API activity using CloudTrail Data Events Sends CloudTrail logs to CloudWatch Logs Uses Metric Filters to detect: AccessDenied or 403 errors Access to restricted prefixes such as private/* Triggers CloudWatch Alarms when suspicious activity is detected Sends email notifications through Amazon SNS Architecture Diagram This diagram should show: User accessing S3 bucket CloudTrail captu...

Day 22 - Deploying an RDS MySQL Web Application Stack with Terraform Modules

Image
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 ...