In AWS ECS, can I dedicate a set of EC2 instances within a cluster for a certain task?

313 Views Asked by At

I'm working in a multi-tenant ECS cluster with EC2 nodes/instances. I'd like to add some new EC2 instances in this cluster that are dedicated to my app, so no other apps can use these instance. I'd prefer to do this without making changes to other peoples' apps.

In k8s I would put a taint on the dedicated instances and put a toleration on my app. But I'm not sure how I should do this in ECS, where there doesn't seem to be the concept of taints.

1

There are 1 best solutions below

0
Mark B On

Create a separate (non-default) Capacity Provider in your ECS cluster. Then include a capacity provider strategy in either your ECS Service definition, or your ECS Run Task command, that specifies that new capacity provider.