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:
- Manually create an EC2 instance with a GPU type.
- 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.
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