0

Currently, with rexray, I'm creating an EBS volume per task on each availability zone. I'm looking for a way in which I could create a separate, independent volume for each task instance. To illustrate:

  • 1 ECS service configured across 2 availability zones, set task desired count to 3
  • Task definition that creates an EBS volume
  • The above two creates two volumes, one in each AZ

In the above scenario, two tasks would connect to one volume, and the other task to the other volume.

Is there any way in which I could provision an EBS volume for each instance of a task? The main goal is to have many instances of a task with each their own volume, it would not be a problem if they are attached in a different order when there's a redeployment, but it is important that two tasks do not use the same volume.

4

1 回答 1

0

不能这样做。ECS 服务中的任务实例是可互换的、一次性的和相同的。

我认为对于您的用例,EFS会更好,因为您可以从您的应用程序以编程方式控制对它的访问。

于 2021-07-29T22:13:03.930 回答