N
N
Nickname1112021-01-29 16:38:55
Amazon Web Services
Nickname111, 2021-01-29 16:38:55

How to schedule multiple tasks (about 20) using one AWS ECS container?

Let's say I have a container and a task on AWS ECS (task definition). I need to run this task on a schedule, in the form of 20 different instances with different environment variables (that is, 20 parallel tasks). I have several ideas how to do this, but I'm not sure which one is correct.

  1. Create several task definitions with different environment variables (as for me, the most stupid idea, but what if there are 50 or 100 tasks)?
  2. Create multiple targets for the scheduled task, but their number is limited to 5, so this approach is not an option.
  3. Create 20 container overrides with different environment variables, but I haven't found a way to do it via the UI (only via aws cli), and I'm not sure if it's correct.

Please advise, I'm new.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stanislav Bodrov, 2021-01-30
@jenki

How to schedule multiple tasks
What to do?

E
Eugene, 2021-02-01
@yellowmew

The most logical way in your case is exactly container overrides and there is nothing wrong if you create cloudwatch tasks through cli
To facilitate work in principle, you can use terraform (although I understand that this may be an extra load for you now, but , believe me, it will come in handy)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question