I have the following setup in ECS:
- N services
- 1 cluster composed by M EC2 instances
- S (S < N) services share a dependency, i.e.: they share the same source volume
Because of the shared volume, I would like to force those S services to always run on the same EC2 instance.
I have been reading about placement constraints but it won't help in my case.
Question: Is it possible to force services to always run on the same EC2 instance?
A possible solution I come up with would be to create a dedicated cluster for my S services and add a placement constraint with binpack placement strategy to make sure all the services will end up in the same EC2 instance, as long as there are available resources. This is not ideal in term of resource consumption and maintenance.