High-level architecture of the CI/CD Blue-Green deployment High-level architecture of the CI/CD Blue-Green deployment (exported from Lucidchart).


๐Ÿš€ Overview

This project delivers a complete CI/CD Blue-Green deployment pipeline for containerised workloads running on AWS ECS Fargate, with the entire infrastructure defined using AWS CDK (TypeScript).

It demonstrates:

  • Zero-downtime deployments using CodeDeploy traffic shifting
  • Infrastructure as Code with modular, testable CDK stacks
  • Automated CI with GitHub Actions + CodePipeline
  • End-to-end validation through Jest tests and AWS Console checks

This mirrors real-world cloud engineering and DevOps practices used in production environments.


๐Ÿงฑ AWS Services Used

ServicePurpose
AWS CDK (TypeScript)Defines the entire pipeline and ECS infrastructure as code.
Amazon ECS FargateServerless compute platform for running containers.
AWS CodePipeline + CodeBuildBuilds, synthesises, and deploys application updates from GitHub.
AWS CodeDeployOrchestrates Blue/Green traffic shifting between target groups.
Application Load Balancer (ALB)Routes traffic to the active environment (Blue or Green).
AWS Secrets ManagerStores the GitHub access token securely.
Amazon VPCProvides isolated networking for ECS tasks and pipeline components.

๐Ÿงฉ Key Features

  • Fully automated CI/CD pipeline from GitHub commit โ†’ build โ†’ ECS deployment
  • True Blue/Green deployments with CodeDeploy-managed traffic shifting
  • 7/7 Jest unit tests verifying stack correctness
  • All IaC modularised into VPC, ECS, Service, CodeDeploy, and Pipeline stacks
  • Lucidchart architecture diagram included for portfolio clarity
  • CDK Synth & Deploy validated across the entire pipeline

๐Ÿง  Lessons Learned

  • Managing stack dependencies using CDKโ€™s addDependency()
  • Coordinating ECS, ALB, and CodeDeploy for seamless Blue/Green releases
  • Using target groups and listener rules for zero-downtime switching
  • Implementing clean, interview-ready IaC that is easy to iterate on
  • Debugging real-world issues with CodeDeploy event logs and ECS health checks

Reflection:
This project strengthened my understanding of end-to-end CI/CD pipelines, advanced ECS deployment strategies, and production-grade IaC structure.
It also deepened my troubleshooting skills across CodePipeline, ALB routing, and ECS task health checks.


๐Ÿงช Testing & Validation

  • All unit tests run via Jest (npm run test)
  • 7/7 unit tests passing, covering VPC, ECS, Service, CodeDeploy, and Pipeline
  • CDK Synth confirms clean, error-free infrastructure generation
  • Deployed stack verified in AWS Console (CodeDeploy, ECS, ALB)
  • Full teardown performed after verification to avoid ongoing charges

๐Ÿ–ผ๏ธ Screenshots

ScreenshotDescription
Jest Tests PassingAll Jest tests passed successfully.
CI WorkflowGitHub Actions CI workflow performing build + tests.
CodePipeline StagesCodePipeline stages: Source โ†’ Build โ†’ Deploy.
ECS Blue/GreenECS showing Blue/Green target groups controlled by CodeDeploy.
Build OutputCodeBuild logs confirming artifact and appspec file generation.

๐Ÿ“˜ Documentation


๐Ÿ Project Status

โœ… Stable and Complete (v1.0.0)
All tests passed, architecture validated, and code is fully production-aligned and portfolio-ready.


ยฉ 2025 Nicolas Gloss โ€” AWS Cloud Engineer Portfolio
Built and deployed using AWS CDK and Hugo PaperMod.