I have built an container and run successfully by aws ecs fargate. The container will download file form s3, process and upload file to s3. But because the ecs service restart policy, the service will restart a container which I don't want.
In Kubernetes, I use restartPolicy: OnFailure
, but I have read the doc for ecs, all the task definition and service definition.
The closest parameter I find is "dockerLabels", set the set "--restart": 'no', but it didn't work.
How can I do to not let the container restart in ecs?