cd ../projects
Containers / AWS

🐳AWS ECS Fargate GitLab CI

Fully automated container workloads on serverless AWS

AWS ECSFargateGitLab CIECRCodeDeployTerraformCloudWatchALB

OVERVIEW

End-to-end automation for deploying containerized workloads to AWS ECS Fargate using GitLab CI/CD with blue/green deployments via AWS CodeDeploy, ECR image scanning, and Terraform-managed infrastructure.

ARCHITECTURE

// mermaid architecture diagram
graph LR
  GIT[GitLab] --> CI[CI Pipeline]
  CI --> ECR[ECR Build & Scan]
  ECR --> TF[Terraform Apply]
  TF --> ECS[ECS Service Update]
  ECS --> CD[CodeDeploy B/G]
  CD --> ALB[ALB Traffic Shift]
  ALB --> FARGATE[Fargate Tasks]

💡 Render with mermaid.live for interactive diagram

KEY HIGHLIGHTS

  • GitLab CI multi-stage: build → scan → plan → deploy
  • Blue/green deployment with automatic rollback on health check failure
  • ECR vulnerability scanning with blocking policy on CRITICAL CVEs
  • CloudWatch Container Insights for task-level metrics
  • Auto Scaling based on CPU, memory, and custom CloudWatch metrics

METRICS

Blue/green deployments < 3min
Auto-scaling 2-50 tasks
ECR image scanning enabled
99.95% service availability

TECH STACK

AWS ECSFargateGitLab CIECRCodeDeployTerraformCloudWatchALB
Back to all projects