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?
CodePudding user response:
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.
CodePudding user response:
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.