Search code examples
amazon-web-servicesaws-cloudformationamazon-ecsecs-taskdefinition

Multiple Tasks Definition on ECS Service using CloudFormation


Hi I'm newbie in AWS CloudFormation, and I'm working right now with an ECS Service with 1 task, but I would like to add more tasks using CloudFormation. However, inside the properties on AWS ECS Service, there's one called Task Definition, and it only allows to put 1 tasks. How can I configure in order to use more tasks. I´m doing the project on the same Region. Thanks.

Task Definition Property


Solution

  • I've already got it. There's other parameter called DesiredCount, and it's gonna make x replicas, depending the number of tasks you need. So if you want to put 5 tasks in your service, DesiredCount parameter that you have to put is 5. Here is the link if you want to search the parameter DesiredCount for more info.