Skip to content
felicity.lois// Cloud & devops
Back to Portfolio

Multi-Tenant Infrastructure Automation Platform

Self-Service AWS ECS Deployment Platform

Project Overview

Designed and developed a self-service infrastructure automation and deployment platform for a leading provider of customizable learning management systems (LMS), SPIFF management, and rewards programs for major brands and dealership networks. The platform enables internal operations teams to provision and deploy isolated client environments on-demand through a management portal, eliminating manual infrastructure setup and enabling rapid client onboarding. Built on AWS ECS (EC2 launch type) with a shared cluster architecture, the solution provisions dedicated, tenant-isolated infrastructure for each new client with a single button click. Each client receives a dedicated ECS service, Amazon ECR repository, CI/CD pipeline (CodePipeline + CodeBuild), blue-green deployment automation (CodeDeploy), Application Load Balancer target group, and Route 53 DNS record—all provisioned automatically through the management portal. The platform uses a single-repository, multi-tenant application architecture where tenant-specific configurations are served dynamically via an API from the management application, eliminating the need for per-client code repositories. The application stack is built on FastAPI (Python) for the backend and Vue.js for the frontend, enabling a modern, responsive management experience.

Problems

  • Manual infrastructure provisioning for each new client required DevOps intervention, creating bottlenecks and delaying client onboarding by days or weeks.
  • Inconsistent deployment practices across clients led to configuration drift, operational complexity, and difficulty troubleshooting issues.
  • Lack of self-service capabilities meant operations teams depended on engineering resources for routine infrastructure tasks, limiting scalability.
  • No standardized CI/CD for client environments resulted in manual deployments, increased risk of errors, and inability to roll back failed releases quickly.
  • Complex multi-tenant management made it difficult to track which infrastructure belonged to which client, complicating auditing, cost allocation, and lifecycle management.

Goals

  • Enable self-service infrastructure provisioning so operations teams can onboard new clients instantly without engineering intervention.
  • Standardize deployment workflows across all clients using automated CI/CD pipelines with blue-green deployments for zero-downtime releases.
  • Implement tenant isolation at the infrastructure level while maintaining shared cluster economics to balance cost efficiency with security and performance.
  • Reduce operational overhead by automating infrastructure lifecycle management (creation, updates, teardown) through a centralized management portal.
  • Accelerate client onboarding from days to minutes by eliminating manual provisioning steps and providing instant deployment capabilities.
  • Maintain cost efficiency through shared ECS cluster and ALB resources while providing dedicated services and pipeline isolation per client.

Role & Responsibilities

  • Architected and developed the complete infrastructure automation platform including the management portal (FastAPI + Vue.js), AWS infrastructure provisioning logic, and CI/CD pipeline orchestration.
  • Designed the multi-tenant ECS architecture with shared cluster and ALB infrastructure, tenant-isolated ECS services, and auto-scaling EC2 launch type for cost-effective resource utilization.
  • Implemented self-service provisioning workflows enabling operations teams to create client infrastructure, trigger deployments, and manage lifecycle operations through a web interface.
  • Built automated CI/CD pipeline generation using AWS CodePipeline, CodeBuild, and CodeDeploy with blue-green deployment strategy for zero-downtime client releases.
  • Developed the tenant configuration API allowing the single-repository application to serve client-specific configurations dynamically, eliminating code duplication.
  • Configured Application Load Balancer routing with per-client target groups and health checks, integrated with Route 53 for automatic DNS management.
  • Established infrastructure-as-code practices using boto3 (AWS SDK for Python) to programmatically provision ECS services, ECR repositories, CodePipeline resources, target groups, and DNS records.
  • Implemented monitoring and logging through CloudWatch to track deployment status, service health, and infrastructure events across all client environments.

Architecture & Deployment Flow

  • Amazon ECS Cluster (EC2 Launch Type) serves as the shared compute foundation for all client workloads.
  • EC2 Auto Scaling Group dynamically scales cluster capacity based on resource utilization (CPU, memory) across all running ECS services.
  • Application Load Balancer (ALB) provides centralized ingress for all client environments with per-client target groups and host-based routing rules.
  • Route 53 Hosted Zone manages DNS records for all client subdomains, automatically provisioned during infrastructure creation.
  • FastAPI backend orchestrates infrastructure provisioning through AWS SDK (boto3), manages tenant configuration data, and exposes API endpoints for client applications.
  • Vue.js frontend provides a responsive web interface for operations teams to manage client infrastructure and trigger deployments.
  • PostgreSQL database stores client metadata, configuration mappings, infrastructure state, and deployment history.
  • Per-client infrastructure includes dedicated ECS Service, ECR Repository, CodePipeline, ALB Target Group, Route 53 Record, and CloudWatch Log Groups.
  • Single application repository contains FastAPI + Vue.js code shared by all clients; configuration API serves tenant-specific settings based on client subdomain.
  • CodePipeline executes: Source (GitHub) → Build (CodeBuild: Docker image build/test) → Deploy (CodeDeploy: blue-green deployment to ECS).
  • ALB routes client requests via host-based routing to appropriate target groups; ECS tasks fetch client configuration from management portal API.

Key Implementation Details

Multi-Tenant Architecture

Shared cluster model balances cost efficiency with tenant isolation: all clients run on the same ECS cluster and share ALB infrastructure, reducing per-client overhead by 60-70%. Service-level isolation ensures each client has a dedicated ECS service with separate task definitions, scaling policies, and target groups for workload and resource isolation. Configuration-based tenancy uses a single application codebase serving all clients dynamically based on API-provided configurations, eliminating code duplication and simplifying updates. Network isolation via ALB listener rules and target groups prevents cross-client traffic.

ECS Cluster & Auto-Scaling

EC2 Launch Type provides cost-effective compute for predictable, steady-state workloads with full control over instance types and scaling policies. Cluster Auto Scaling monitors aggregate CPU and memory reservation across all services and scales EC2 instances up or down to maintain target utilization (~70-80%). Service Auto Scaling adjusts the number of ECS tasks per client based on request rate, CPU, or memory metrics, ensuring responsive performance during traffic spikes.

Infrastructure Provisioning Automation

Programmatic AWS API calls (boto3) from the FastAPI backend provision all infrastructure components: ECS services, ECR repositories, CodePipeline, CodeBuild projects, CodeDeploy applications, target groups, listener rules, Route 53 records. Idempotent operations ensure re-running provisioning for an existing client updates resources rather than failing, supporting infrastructure updates and drift correction. Infrastructure state tracking in PostgreSQL database records provisioning status, resource ARNs/IDs, and timestamps for auditing and lifecycle management. Error handling and rollback capabilities log failures and support manual or automated cleanup.

CI/CD Pipeline Architecture

Single-repository strategy allows all clients to deploy from the same GitHub repository, simplifying codebase management and enabling simultaneous feature rollouts to all clients. Per-client pipelines ensure each client has a dedicated CodePipeline instance to isolate build artifacts, deployment history, and permissions. Blue-green deployment with CodeDeploy provisions new ECS tasks (green) alongside existing tasks (blue), performs health checks, and shifts traffic gradually; old tasks are terminated only after successful cutover, enabling instant rollback on failure. Build caching and optimization through CodeBuild using Docker layer caching and dependency caching (pip for Python, npm for Vue.js) to accelerate build times.

Configuration Management

Centralized configuration API in the management portal exposes tenant-specific settings via authenticated endpoints. Runtime configuration fetching allows ECS tasks to call the configuration API on startup and cache settings locally, with support for hot-reloading on configuration updates. Secrets management stores sensitive client credentials (database passwords, API keys) in AWS Secrets Manager or SSM Parameter Store, retrieved by ECS tasks via IAM task roles. Environment variables pass non-sensitive configuration (client ID, API endpoint URLs) to ECS tasks via task definition.

Cost Optimization

Shared infrastructure (ECS cluster, ALB) amortizes fixed costs across all clients, reducing per-client infrastructure overhead by approximately 60-70% compared to dedicated clusters. EC2 auto-scaling ensures cluster capacity matches actual demand, avoiding over-provisioning and reducing idle compute costs. ECR lifecycle policies automatically delete old Docker images after 30 days or keep only the latest 10 versions, minimizing storage costs. Consolidated billing and cost allocation tags on all provisioned resources enable accurate per-client cost tracking and chargeback.

Results & Impact

  • Reduced client onboarding time from days to minutes by enabling self-service infrastructure provisioning through the management portal, eliminating DevOps bottlenecks.
  • Enabled operations team autonomy for infrastructure management and deployments, freeing engineering resources to focus on platform enhancements and new features.
  • Achieved zero-downtime deployments for all clients through automated blue-green deployment strategy with CodeDeploy, improving reliability and reducing deployment risk.
  • Standardized infrastructure and deployment practices across all clients, reducing configuration drift, simplifying troubleshooting, and improving operational consistency.
  • Reduced per-client infrastructure costs by approximately 60-70% through shared cluster and ALB architecture while maintaining service-level isolation and performance guarantees.
  • Accelerated feature delivery by using a single-repository, multi-tenant application model that allows simultaneous rollout of updates to all clients without per-client code changes.
  • Improved visibility and control over client infrastructure lifecycle with centralized management portal, real-time deployment tracking, and comprehensive logging.

Technology Stack

Cloud & Compute

  • Amazon ECS (EC2 Launch Type)
  • EC2 Auto Scaling Group
  • Amazon ECR

CI/CD & Deployment

  • AWS CodePipeline
  • AWS CodeBuild
  • AWS CodeDeploy
  • GitHub

Security & Configuration

  • AWS Secrets Manager
  • SSM Parameter Store
  • SSM Parameter Store
  • IAM Task Roles

Networking & Load Balancing

  • Application Load Balancer (ALB)
  • Amazon Route 53

Management Platform

  • FastAPI (Python)
  • Vue.js
  • PostgreSQL
  • boto3 (AWS SDK)

Monitoring & Logging

  • Amazon CloudWatch Logs
  • Amazon CloudWatch Metrics
  • Amazon CloudWatch Alarms
  • CloudWatch Events

Containerization

  • Docker