CodePipeline ECS Rolling Updates for multiple services

0

Hi,

I think I have worked out how to enable rolling updates for more than one service in my cluster. I solved this by writing out more than one imagedefinitons.json file.

However I have an issue in that every time my pipeline runs, even if the ECR image digest hasn't changed, both services taskDefs get bumped and replace the previous task.

Is this the expected behaviour? Is there a way for ECS deploy to spot the digest is the same and not to roll forward.

Thanks, Guy

1 Answer
0

Hello,

This is actually an expected behavior for CodePipeline, since whenever a Pipeline is executed, by nature this means there are some changes being pushed to the Source and a deployment needs to be done, so the ECS tasks will be replaced by the deployment. See the current available option here. As a solution, you might consider to split the Pipeline to multiple Pipelines for each ECS service. Alternatively, if you still would like to use the same Pipeline to deploy multiple ECS services, to ensure availability, I would recommend to increase the desired count and minimumHealthyPercent and maximumPercent to maintain tasks availability during rolling update.

SUPPORT ENGINEER
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions