0
votes

Hi I'm newbie on CloudFormation AWS, and I'm working right now with a ECS Service with 1 task, but I would like to put more tasks using CloudFormation. However inside the properties on AWS ECS Service, there's one called Task Definition, and 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

2

2 Answers

0
votes

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.

0
votes

Sadly, you can't do this. A single service can run multiple copies of only one task. So if you want to run multiple instances of different tasks in multiple, you have to create multiple services, i.e., one service per task.

However, a single task can contain multiple containers.