Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Required Cloudformation Script for Blue/Green deployment on ECS

Tags:

I am trying to write a cloud-formation template for AWS ECS with blue green deployment support. This blue-green feature was added recently by AWS in ECS and couldn't find any reference for updating it in cloud-formation template. They have given documentation on, how to do it through UI but not through cloud-formation. I guess, AWS might not updated their cloud-formation documentation as it is a new feature. Any help to find the documentation would be appreciated. Thanking you in advance.

like image 908
Gokula Adabala Avatar asked Jan 22 '19 09:01

Gokula Adabala


People also ask

Does ECS use CloudFormation?

Amazon ECS supports creating clusters, task definitions, services, and task sets in AWS CloudFormation. The following examples demonstrate how to create resources with these templates using the AWS CLI.

How do you implement blue green deployment?

The blue/green deployment process works as follows: Deploy new version—deploy the new (green) version alongside the current (blue) version. Test it to ensure it works as expected, and deploy changes to it if needed. Switch over traffic—when the new version is ready, switch overall traffic from blue to green.


1 Answers

Support for blue/green deployment in CloudFormation has been added. It can be found here in the documentation: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-deploymentcontroller.html

In the "Type" property you can choose "CODE_DEPLOY" as the deployment type. Hope this helps!

like image 166
Nora Avatar answered Jan 04 '23 16:01

Nora