All projects

DevOps / Cloud / Backend

Cloud Design

design and deploy a cloud-based microservices application on Amazon Web Services (AWS) using Terraform (IaC) and Docker containerization.

  • AWS
  • Terraform
  • Docker
  • Amazon ECS

Overview

Cloud Design extends the CRUD Master microservices platform by deploying its Dockerized services to a production-oriented AWS infrastructure.

The architecture runs the API Gateway, Inventory, Billing, PostgreSQL, and RabbitMQ workloads on Amazon ECS with EC2 capacity, distributed across private subnets and multiple Availability Zones.

Public requests enter through AWS API Gateway, where Cognito validates JWT authentication before traffic reaches the internal infrastructure through a VPC Link and private Application Load Balancer.

The entire AWS environment is provisioned using Terraform, with centralized secrets management, private service discovery, monitoring, autoscaling, and infrastructure cost optimization.

Problem Statement

Running the containerized microservices platform locally provides reproducible deployments but does not address cloud-level concerns such as scalability, availability, secure public access, centralized monitoring, and infrastructure automation.

This project addresses those limitations by migrating the platform to AWS and designing a cloud architecture where application workloads remain private while public traffic is authenticated and routed through managed AWS services.

Infrastructure as Code, autoscaling, service discovery, secrets management, and centralized observability make the environment easier to reproduce, operate, and maintain.

Features Implemented

  • Provisioned the complete AWS infrastructure using modular Terraform configuration.

  • Deployed containerized microservices using Amazon ECS with the EC2 launch type.

  • Configured an EC2 Auto Scaling Group and ECS Capacity Provider for dynamic cluster capacity.

  • Distributed compute resources across two Availability Zones for improved availability.

  • Designed public and private subnet layers inside a dedicated AWS VPC.

  • Kept ECS hosts and application workloads inside private subnets without public IP addresses.

  • Configured AWS API Gateway as the public entry point to the application.

  • Integrated Amazon Cognito with API Gateway for JWT-based authentication.

  • Connected API Gateway to an internal Application Load Balancer through a VPC Link.

  • Used AWS Cloud Map for private DNS-based service discovery between microservices.

  • Implemented ECS Service Auto Scaling for the API Gateway and Inventory services.

  • Stored database and RabbitMQ credentials securely using SSM Parameter Store SecureString parameters.

  • Applied dedicated security groups to isolate application, database, load balancer, and RabbitMQ traffic.

  • Streamed container logs to Amazon CloudWatch Logs.

  • Created a CloudWatch dashboard for request traffic, latency, service health, CPU, memory, and application errors.

  • Added container and load balancer health checks for application and infrastructure services.

  • Configured Terraform remote state using an encrypted Amazon S3 backend.

  • Designed the infrastructure with cost optimization in mind.

Technical Highlights

  • Built a private multi-AZ AWS architecture using ECS, EC2, ALB, API Gateway, and VPC networking.

  • Automated the complete infrastructure lifecycle using modular Terraform.

  • Secured public access with Cognito JWT authentication and isolated internal services using security groups.

  • Implemented private service discovery through AWS Cloud Map.

  • Added application and infrastructure autoscaling using ECS Service Auto Scaling and EC2 Capacity Providers.

  • Centralized secrets and observability using SSM Parameter Store and CloudWatch.

Impact

The project evolved the CRUD Master platform from a locally orchestrated container environment into a complete cloud deployment with automated infrastructure provisioning and operational visibility.

The architecture introduced authenticated public access, private microservice networking, dynamic scaling, secure secret handling, centralized logs and metrics, and multi-AZ deployment while preserving the original synchronous and asynchronous communication patterns.

Cost-aware architectural choices were also applied to reduce unnecessary cloud expenses while maintaining the required scalability, security, and availability.