AWS ECS Periodical Job - Automatically Scale in instance

Viewed 119

Amazon ECS provides really good service for scheduled tasks : ECS Scheduled tasks that works pretty well. However it's important in this always keep one ECS instance in ECS cluster. What is the best way:

  1. Launch/scale in ECS instance in for periodical job (just before task execution);
  2. Run ECS tasks on newly created instance;
  3. Terminate/scale out instance after completion.

One possible workaround is to write lambda that will do smth. like that (launch ec2) but it looks as too much pain.

1 Answers
Related