Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Amazon Web Services
  3. ecs-blue-green-deployment

ecs-blue-green-deployment

Apache-2.0Python

A reference architecture for implementing blue/green deployments on Amazon ECS using AWS CloudFormation and CodePipeline.

GitHubGitHub
460 stars450 forks0 contributors

What is ecs-blue-green-deployment?

ECS Blue/Green Deployment is a reference architecture for implementing blue/green deployments on Amazon ECS. It automates the deployment process using AWS CloudFormation templates and AWS CodePipeline to enable safe, zero-downtime updates for containerized applications. The architecture creates a continuous delivery pipeline that builds and deploys containers to an ECS cluster, with a manual approval step to validate changes before promoting them to production.

Target Audience

AWS developers and DevOps engineers managing containerized applications on Amazon ECS who need to implement safe, automated deployment strategies with rollback capabilities. It is specifically for teams using AWS services like CloudFormation, CodePipeline, and Application Load Balancer.

Value Proposition

Developers choose this project because it provides a pre-built, automated pipeline for blue/green deployments on ECS using Infrastructure as Code, reducing manual effort and risk. Its unique selling point is the integration of a manual approval step and target group swapping via AWS Lambda, allowing controlled promotion of new versions with zero downtime and easy rollback.

Overview

Reference architecture for doing blue green deployments on ECS.

Use Cases

Best For

  • Implementing automated blue/green deployments for containerized applications on Amazon ECS using AWS CloudFormation.
  • Setting up a continuous delivery pipeline with AWS CodePipeline and CodeBuild for ECS services.
  • Achieving zero-downtime updates for ECS applications with manual approval gates for safety.
  • Managing infrastructure as code for ECS deployments, including VPC, ALB, and target groups.
  • Testing new application versions in isolation on a staging environment (port 8080) before promoting to production.
  • Quickly rolling back to previous application versions by re-triggering the approval process and swapping target groups.

Not Ideal For

  • Teams that can use Amazon ECS's native blue/green deployment feature, as this custom implementation is outdated and less integrated.
  • Organizations with minimal infrastructure needs, since it creates numerous AWS resources (VPC, ALB, etc.) that may be overkill for simple apps.
  • Projects requiring frequent, automated deployments without manual gates, as the pipeline includes a mandatory approval step that adds delay.
  • Environments where multi-cloud portability is a priority, due to heavy reliance on AWS-specific services like CloudFormation and CodePipeline.

Pros & Cons

Pros

Automated Pipeline Integration

Leverages AWS CodePipeline and CodeBuild to automatically build and deploy container images, as detailed in the README's Build and Deploy stages, reducing manual effort.

Safe Manual Approval

Includes a manual review stage in the pipeline, allowing approvers to validate changes before promotion, which minimizes risk in production deployments.

Infrastructure as Code

Uses CloudFormation templates to provision all AWS resources (VPC, ALB, ECS services), enabling reproducible and version-controlled infrastructure setup.

Zero-Downtime Traffic Swapping

Employs a Lambda function to swap Application Load Balancer target groups, shifting traffic between blue and green environments without downtime, as described in the implementation details.

Cons

Superseded by Native ECS Feature

The README's UPDATE note indicates that ECS now supports native blue/green deployments, making this reference architecture potentially redundant and less maintained for new projects.

Complex Setup Prerequisites

Requires specific AWS CLI version (>=1.11.37), IAM policies like PowerUserAccess, and multiple steps including forking repos and S3 bucket configuration, which can be error-prone.

Vendor Lock-in to AWS

Heavily dependent on AWS services such as CloudFormation, CodePipeline, and Lambda, limiting flexibility and portability to other cloud platforms.

Frequently Asked Questions

Quick Stats

Stars460
Forks450
Contributors0
Open Issues7
Last commit1 year ago
CreatedSince 2017

Tags

#aws-cloudformation#container-orchestration#zero-downtime#blue-green-deployment#codebuild#codepipeline#infrastructure-as-code#ecs#continuous-deployment#amazon-ecs#aws-lambda#aws-ecs#aws-codepipeline#fargate

Built With

A
AWS CodePipeline
A
Amazon S3
A
AWS CloudFormation
A
Amazon ECS
A
AWS CodeBuild
A
AWS Lambda

Included in

Amazon Web Services14.0k
Auto-fetched 13 hours ago

Related Projects

amazon-ecs-agentamazon-ecs-agent

Amazon Elastic Container Service Agent

Stars2,183
Forks669
Last commit1 day ago
Stelligent/muStelligent/mu

A full-stack DevOps on AWS framework

Stars966
Forks133
Last commit6 years ago
bloxblox

Open source tools for building custom schedulers on Amazon ECS

Stars938
Forks73
Last commit8 years ago
ecs-refarch-continuous-deploymentecs-refarch-continuous-deployment

ECS Reference Architecture for creating a flexible and scalable deployment pipeline to Amazon ECS using AWS CodePipeline

Stars850
Forks958
Last commit4 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub