我该怎么做才能不让容器在 aws ecs 中重启?
How can I do to not let the container restart in aws ecs?
我已经通过 aws ecs fargate 成功构建了一个容器和 运行。容器将从 s3 中下载文件,处理并将文件上传到 s3。但是因为ecs服务重启策略,服务会重启一个我不想要的容器。
在Kubernetes中,我使用restartPolicy: OnFailure
,但是我已经阅读了ecs的文档,所有的任务定义和服务定义。
我找到的最接近的参数是"dockerLabels",set the set "--restart": 'no',但是没用
ecs中如何不让容器重启?
您所描述的内容与 running ECS tasks manually or according to a schedule. Unlike running tasks with the service scheduler, the tasks won't be restarted and are ideal for one-time or periodic batch execution workloads. You can run a task manually from the AWS Console or using the RunTask API 的用例一致。 Tasks 可以用来模仿 Kubernetes 中的 Jobs 和 CronJobs。
Services 将始终保持所需的任务数,并且无法修改此行为:
If any of your tasks should fail or stop for any reason, the Amazon ECS service scheduler launches another instance of your task definition to replace it and maintain the desired count of tasks in the service depending on the scheduling strategy used.
我已经通过 aws ecs fargate 成功构建了一个容器和 运行。容器将从 s3 中下载文件,处理并将文件上传到 s3。但是因为ecs服务重启策略,服务会重启一个我不想要的容器。
在Kubernetes中,我使用restartPolicy: OnFailure
,但是我已经阅读了ecs的文档,所有的任务定义和服务定义。
我找到的最接近的参数是"dockerLabels",set the set "--restart": 'no',但是没用
ecs中如何不让容器重启?
您所描述的内容与 running ECS tasks manually or according to a schedule. Unlike running tasks with the service scheduler, the tasks won't be restarted and are ideal for one-time or periodic batch execution workloads. You can run a task manually from the AWS Console or using the RunTask API 的用例一致。 Tasks 可以用来模仿 Kubernetes 中的 Jobs 和 CronJobs。
Services 将始终保持所需的任务数,并且无法修改此行为:
If any of your tasks should fail or stop for any reason, the Amazon ECS service scheduler launches another instance of your task definition to replace it and maintain the desired count of tasks in the service depending on the scheduling strategy used.