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


πŸš€ Overview

This project implements a complete CI/CD Blue-Green Deployment pipeline for containerised workloads on AWS ECS Fargate, provisioned entirely with AWS CDK (TypeScript).
It demonstrates modern DevOps and Cloud Engineering practices including Infrastructure as Code, automated testing, and zero-downtime deployments.


🧱 AWS Services Used

Service Purpose
AWS CDK (TypeScript) Defines the entire infrastructure as code for reproducible, modular deployments.
Amazon ECS Fargate Runs the containerised web application serverlessly, without managing EC2 instances.
AWS CodePipeline + CodeBuild Automates build, synth, and deployment from GitHub commits.
AWS CodeDeploy Manages Blue/Green traffic shifting between production and staging target groups.
Application Load Balancer (ALB) Routes live traffic to the Blue or Green environment.
AWS Secrets Manager Stores the GitHub access token for secure CodePipeline authentication.
Amazon VPC Provides isolated networking with public/private subnets and NAT Gateway.

🧩 Key Features

βœ… End-to-end CI/CD automation β€” from GitHub commit β†’ build β†’ ECS deployment
βœ… True Blue/Green deployments using CodeDeploy traffic shifting
βœ… All stacks built with reusable, testable CDK constructs
βœ… 7/7 Jest unit tests passing across all stacks
βœ… Lucidchart diagram integrated for architecture clarity
βœ… Clean AWS resource teardown verified via CLI and Console


🧠 Lessons Learned

  • Stack dependency management using addDependency() to ensure correct build order
  • Integration of CodePipeline and CodeDeploy for ECS Blue/Green release control
  • Handling CodeDeploy target groups and listener mapping for zero downtime
  • Building interview-ready, modular IaC projects with complete documentation
  • Validating deployments with Jest and AWS Console verification

Reflection:
This project strengthened my understanding of end-to-end CI/CD automation and reinforced the value of Infrastructure as Code for maintainability and clarity.
I also gained deeper insight into CodeDeploy’s orchestration of Blue/Green traffic shifting and how to debug real-world stack dependency issues.
Overall, it improved both my AWS troubleshooting confidence and my ability to design production-style, testable cloud architectures.


πŸ§ͺ Testing & Validation

  • All unit tests run via Jest (npm run test)
  • 7/7 passing tests confirmed (VPC, ECS, Service, CodeDeploy, Pipeline)
  • CDK synth (cdk synth) validated all stacks compile successfully
  • Deployed stacks verified visually in AWS Console β†’ CodeDeploy β†’ ECS Services
  • All resources deleted post-validation to avoid ongoing cost

πŸ–ΌοΈ Screenshots

Screenshot Description
Jest Tests Passing βœ… All Jest tests passed successfully for all stacks.
CI Workflow πŸ”„ GitHub Actions CI workflow confirming automated build and tests.
CodePipeline Stages πŸš€ AWS CodePipeline stages showing Source β†’ Build β†’ Deploy.
ECS Blue/Green 🟦🟩 ECS Service view showing Blue and Green target groups managed by CodeDeploy.
Build Output 🧱 CodeBuild logs confirming artifact creation and appspec validation.

πŸ“˜ Documentation


🏁 Project Status

βœ… Stable and Complete (v1.0.0)
All tests passed, resources validated, cleaned up, and tagged for portfolio presentation.


Β© 2025 Nicolas Gloss β€” AWS Cloud Engineer Portfolio
Built and deployed using AWS CDK and Hugo PaperMod.