AWS EKS Migration & Microservices Modernization with Cost-Optimized Auto-Scaling

Cover Image

Overview

This project focused on migrating a production-grade AWS workload running across Lambda, EC2, and ECS into a unified, scalable, and future-proof Kubernetes platform using Amazon EKS.

The client’s existing architecture relied on mixed compute services, which made scaling, cost optimization, and long-term maintainability challenging. To address this, I proposed and implemented Amazon EKS as the central orchestration platform, enabling a full transition to containerized microservices.

Migration & Containerization

  • Converted existing AWS Lambda functions into RESTful API-based microservices
  • Refactored applications running on EC2 and ECS into independent microservices
  • Created standardized Dockerfiles and containerized all services
  • Designed environment-specific configurations (dev, staging, production)

EKS Cluster & Compute Strategy

  • Built a production-grade EKS cluster
  • Implemented multiple node groups for reliability and cost efficiency:
    1. Base node group (On-Demand) hosting critical core components and system workloads of Kubernets
    2. Dynamic node group managed by Karpenter, automatically provisioning EC2 instances based on pod CPU and memory requirements
  • Used a mix of On-Demand (ARM and x86) and Spot instances for non-production environments to reduce infrastructure cost

Networking & Traffic Exposure

  • Exposed services using AWS Load Balancer Controller
  • Configured Application Load Balancers (ALB) and Network Load Balancer (NLB) for secure, scalable public access
  • Defined Kubernetes Ingress rules for controlled routing

Auto-Scaling Strategy

Implemented KEDA (Kubernetes Event-Driven Autoscaling) to support multiple scaling triggers:

  • HTTP request rate based scaling
  • RabbitMQ queue depth based scaling
  • SQS/in-flight message based scaling

This allowed each microservice to scale independently based on real business loads.

Deployment & Reliability

  • Used GitHub action workflows with the help of Code build for carrying out the deployment
  • Implemented Argo Rollouts for Blue-Green deployments, ensuring zero-downtime releases
  • Added Pod Disruption Budgets (PDBs) to prevent service disruption during node scaling or replacement
  • Configured graceful shutdown and termination handling to ensure no active requests were dropped during deployments or node drains

Standardization & Templates

Created Helm-based standardized templates for all microservices, including:

  • Argo Rollouts
  • Services & Ingress
  • KEDA ScaledObjects
  • Service Accounts & Secrets
  • Pod Disruption Budgets
  • Monitoring annotations

This significantly improved deployment consistency and onboarding speed for new services.

Monitoring & Security

  • Enabled Amazon CloudWatch Container Insights for:
    1. Node-level metrics
    2. Pod and workload monitoring
  • Integrated Amazon GuardDuty for EKS to detect:
  • Unauthorized access
  • Malware activity
  • Runtime security threats

Outcome

  • Successfully unified all workloads under EKS
  • Improved scalability, resilience, and deployment safety
  • Reduced operational cost through intelligent autoscaling and Spot usage
  • Delivered a secure, observable, and future-ready microservices platform

Skills

  • Amazon EKS
  • Kubernetes
  • AWS Cloud Architecture
  • Microservices Architecture
  • Docker
  • Karpenter
  • KEDA Autoscaling
  • Argo Rollouts (Blue-Green Deployments)
  • AWS Load Balancer Controller
  • Helm
  • CloudWatch Container Insights
  • AWS GuardDuty
  • Cost Optimization
  • Infrastructure Scalability & Reliability
AWS EKS Architecture Diagram