AlwaysData
AlwaysData

Reputation: 555

AWS ECS restrict to only one container instance

I want to only ever run one instance of my container to run at a given time. For instance say my ECS container is writing data to an EFS. The application I am running is built in such a way that multiple instances can not be writing to this data at a given time. So is there a way to make sure that ECS never starts more than one instance. I was worried that when one container was being torn down or stood up that two containers may end up running simultaneously.

I was also thinking about falling back to EC2 so that I could meet this requirement but did want to try this out in ECS.

I have tried setting the desired instances to 1 but I am worried that this will not work.

Upvotes: 0

Views: 1120

Answers (1)

Related Questions