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.
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
AWS CloudFormation Doesn’t have native support for the ECS type Blue/Green DeploymentGroup.
export SAM_SOURCE_BUCKET=<your-sam-bucket>
export STACK_NAME=<your-stack-name>
cd create-deployment-group
make package
make deploy