skip to Main Content

I want to run ECS task only once. I have created a ECS service which continuously runs a task.
Like if I check in the ec2 instance after first container gets executed it automatically starts another container. I don’t want another container to be executed after first container execution I will close the task.

Note: I haven’t created any scheduler.

Is there any way to handle this?

2

Answers


  1. ECS services are for constantly running tasks that need to be replaced if they fail or exit for some reason. ECS scheduled tasks are much more like what you need.

    Login or Signup to reply.
  2. If you want to run a task once in ECS, you can use the AWS CLI. Or check out this tool that simplifies the process a bit.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search