1
votes

First I'll explain a bit my case.

I'm using AWS console (website) to do everything that i'll speak about. I'm currently hosting a new project which is an API. I want a solution that can automatically adjust to the current trafic, and I want the deployment to be as easy as possible.

To host my API and others services I use an ECS cluster, that have currently only one service (the API). There is also an ALB (Application Load Balancer) attached to it. This service can launch from 1 to X tasks, where X is the maximum amount of instance that the Auto Scaling can launch. The Auto Scaling is here to adjust instances number as the number of request to the ALB increase.

Just a sidenote, there is stricly one task per instance. Thus, having 5 instances means 5 total tasks.

As far as I understand, for the ECS tasks to be placed correctly between instances that will be added or removed automatically, it needs a Capacity provider.

Since I want deployment to be easy, I choosed CodeBuild at first to do some stuff (like building a reusable and custom docker image for my API). I discovered that CodePipeline could also somehow wrap the "Build" process AND the "Deploy" process. But it needs a CodeDeploy to already be configured, so I tried to create one with ECS as the computing platform.

Now, the problem is that CodeDeploy need the ECS service to use Blue / Green deployment. To enable Blue / Green deployment, it seems that we are not allowed to have a Capacity Provider.

"Cluster capacity providers are not supported when using the blue/green deployment type." Source

I found a topic that seems to use the Auto Scaling as a Computing platform for the CodeDeploy application Source

But here they only use EC2, and not ECS...

So, is there another way maybe to achieve what i want ?

2
I think you already answered yourself - you can't use B/G with capacity providers.Marcin
Hm yeah, i figured that out by writing the post. Maybe i should've rephrased the title to be more like "can i get rid of the capacity provider in my case to be able to use CodeDeploy"Luxior
You don't have to use CP to use ECS, but you will have to manage scaling in/out of your instances yourself.Marcin
@Luxior Does it support now? Thanks!Franxi Hidro

2 Answers

1
votes

Follow this document: https://docs.aws.amazon.com/codedeploy/latest/userguide/tutorial-ecs-deployment.html, CodeDeploy does not currently support Amazon ECS Capacity Provider.

0
votes

According to this thread on git, ECS service now support Blue / Green deployment with a capacity provider.