/bgECSService

CloudFormation Blue/Green Deployment ECS Service

Primary LanguageGo

Blue Green ECS Service with custom CloudFormation

Why custom ECS Service

AWS ECS Service supports three types of Deployment Controller(For More Details):

  • ECS (default)
  • CODE_DEPLOY(blue/green)
  • EXTERNAL

    We can set CODE_DEPLOY as deployment controller and achieve BLUE/GREEN deployment of the ECS Service unfortunately there is no support to manipulate DeploymentController properties through Cloudformation. You should either use API/CLI or build your own custom cloudformation.

./images/bgService.png

Creating Custom BG ECS service

git clone https://github.com/BalmanRawat/bgECSService.git
export SAM_SOURCE_BUCKET=<your-sam-bucket>
export STACK_NAME=<your-stack-name>
cd create-ecs-service
make package
make deploy

Why custom deployment group

AWS CloudFormation Doesn’t have native support for the ECS type Blue/Green DeploymentGroup.

./images/deploymentGroup.png

Creating Custom BG CodeDeploy Deployment Group

export SAM_SOURCE_BUCKET=<your-sam-bucket>
export STACK_NAME=<your-stack-name>
cd create-deployment-group
make package
make deploy