1

It seems from the GUI that it is not possible (the GPU instance types are simply not listed when you go to create an ECS cluster and look at the list of instance types). However, there is an official AWS blog article here indicating that Amazon itself uses ECS in this way.

I see that there is a an ECS CLI command register-container-instance that could theoretically be used like so:

  1. Manually create an EC2 instance with a GPU type.
  2. Use register-container-instance to register your GPU EC2 instance to an ECS cluster.

However, the documentation notes that this command is supposed to be internal use only, and also it is a bit of a hack and a lot of extra work.

  • Seems your answer is in the question... – Tensibai Apr 8 '17 at 14:53
  • Sort of, but register-container-instance is definitely not the way to go as it turns out. I will post an answer in a sec. – Ezekiel Victor Apr 10 '17 at 21:13
3

You can use custom instances of any type with ECS -- the key is running the ECS container agent on the instance of your choice. So, in general, I followed this documentation on that process with success -- http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-install.html -- but do note that you probably want to also specify the ECS cluster into which the instance goes (otherwise it will go to "default" cluster).

To specify the cluster you specify env var ECS_CLUSTER, typically in /etc/ecs/ecs.config prior to running the container agent. See here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.