View All Projects ↗
AWS / DEVOPS / TERRAFORM

Name App

A simple containerized web application deployed on AWS using a highly available three-tier architecture. Infrastructure is provisioned with Terraform and application deployment is automated through GitHub Actions.

Application Architecture

The application runs across three Availability Zones inside an AWS VPC. Public subnets contain the Application Load Balancer and NAT Gateway, while the application servers and PostgreSQL database remain private.

AWS 3-Tier Deployment Architecture ap-south-1 · 3 AZ
Internet GitHub GitHub Actions Amazon ECR ASG Instance Refresh deploy latest image AWS VPC · 10.0.0.0/20 Availability Zone 1 Availability Zone 2 Availability Zone 3 Public Subnet Public Subnet Public Subnet Application Load Balancer NAT Gateway outbound access Internet Gateway VPC internet access Private Subnet Private Subnet Private Subnet EC2 / ASG Docker Flask :5000 EC2 / ASG Docker Flask :5000 EC2 / ASG Docker Flask :5000 Amazon RDS PostgreSQL · Private Port 5432 AWS Secrets Manager database credentials Amazon CloudWatch EC2 · ALB · RDS monitoring Traffic Database

Automated Deployment

Every push to the main branch builds and tests the Docker image, pushes it to Amazon ECR and triggers an Auto Scaling instance refresh so new instances pull the latest image.

01

Git Push

Code is pushed to the main branch.

02

GitHub Actions

Docker image is built and dependencies are tested.

03

Amazon ECR

Image is tagged and pushed to the private registry.

04

Instance Refresh

ASG replaces instances using the latest deployment.

05

ALB Health Check

Only healthy application instances receive traffic.

Application

A minimal Flask application where users can submit their names and view stored records from PostgreSQL. The interface also exposes the application instance, AWS Region and Availability Zone handling the request.

Name App application interface
Running Application Flask application behind the AWS Application Load Balancer.

AWS Infrastructure

Supporting AWS console screenshots showing the deployed infrastructure and application health.

EC2 Auto Scaling Group
Auto Scaling Group Application instances distributed across Availability Zones.
Application Load Balancer target group
Healthy Targets ALB target group showing healthy application instances.

CI/CD Pipeline

GitHub Actions handles the container build, validation, Amazon ECR push and deployment trigger.

GitHub Actions successful workflow
GitHub Actions Automated build, test, ECR push and deployment workflow.

Monitoring

CloudWatch alarms monitor EC2 CPU utilization, ALB healthy targets and RDS CPU utilization.

Amazon CloudWatch alarms
CloudWatch Monitoring for EC2, ALB and PostgreSQL RDS.

Technology Stack

APPLICATION

Python · Flask · PostgreSQL · HTML · CSS

CONTAINERIZATION

Docker · Amazon ECR

INFRASTRUCTURE

Terraform · Amazon VPC · EC2 · RDS · ALB

SCALING

EC2 Auto Scaling · Multi-AZ deployment

CI/CD

GitHub Actions · OIDC · ECR · ASG Instance Refresh

OBSERVABILITY

Amazon CloudWatch · ALB Health Checks

SECURITY

IAM · Security Groups · Secrets Manager · Private Subnets

NETWORKING

VPC · 3 AZs · Public/Private Subnets · IGW · NAT Gateway

REGION

Asia Pacific (Mumbai) · ap-south-1

What I Built

Infrastructure as Code

AWS networking, security groups, ALB, Auto Scaling, RDS, NAT Gateway and supporting infrastructure are provisioned with Terraform.

Containerized Application

Flask application is packaged as a Docker image and stored in a private Amazon ECR repository.

Private Application Tier

EC2 application instances run inside private subnets and receive traffic only through the ALB.

Private Database

PostgreSQL runs on Amazon RDS inside private subnets and accepts connections from the application security group.

Automated Deployment

GitHub Actions automatically builds, tests and publishes the image before triggering an ASG instance refresh.

Monitoring & Health Checks

CloudWatch alarms and ALB health checks provide visibility into application and infrastructure health.

Deployment Workflow

$ git push origin main
# GitHub Actions starts
$ docker build
$ docker push → Amazon ECR
$ aws autoscaling start-instance-refresh
# New instances pull the latest image
# ALB health checks validate the deployment

Source Code

Terraform infrastructure, Docker configuration, Flask application code and GitHub Actions workflow are available in the repository.

View GitHub Repository ↗