Someone recently asked me about options and pros/cons of different ways to run containers on AWS. Once I was done explaining I thought it might make sense to write it down, maybe it’s useful for more folks out there.
Two quick notes: this ain’t a comprehensive guide, I’m sure I’ve forgotten some options. Let me know. Also, in terms of orchestrator I’ve limited myself to Kubernetes. YMMV.
This option has been around for as long as EC2 and Docker have been around. You use EC2 to spin up one or more VMs, install Docker and—especially if you have multiple VMs where containers can be launched—use shell scripts, Fleet, Puppet, Chef, or the like to manage the lifecycle of your containers. The first wave of container-based apps (from late 2013 on) essentially used this approach.
Pros:
Cons:
Conceptually building on top of the previous recipe, one would use an installer such as kubeadm, kops, or kubicorn to install vanilla Kubernetes on EC2.
Pros:
Cons:
A number of templated solutions exist, such as Heptio’s Quick Start for Kubernetes, that allow you to spin up a Kubernetes cluster with a few clicks or commands.
Pros:
Cons:
A number of vendors are offering their Kubernetes distro on AWS. This is a great option if you don’t want to or can not make the necessary decisions (like which SDN to use, etc.) and want to benefit from additional, higher-level functionality such as build pipelines & registries or multi-tenancy. Some example are:
Pros:
Cons:
Available since 2014, ECS was up until last year the primary way Amazon wanted you to run containers. ECS has a proprietary architecture and orchestrator and is used by a number of customers, from Ubisoft to TIBCO.
Pros:
Cons:
Introduced at the most recent re:Invent in late 2017, Fargate seems to be the gateway drug. It has been called ‘cluster-less container offering’ and other things and has (besides Azure Container Instances) no direct equivalent in other cloud providers.
Pros:
Cons:
Same as Fargate, EKS was revealed at last re:Invent. Unlike Fargate, EKS is at time of writing in early 2018, still only available as part of a sign-up-only preview program. I can’t really say much about it—until I’ve tried it—other than it looks interesting and I’m happy that AWS made that move.
What do you think? Any stories to share about your way to do containers on AWS? Maybe some experience report or deeper insight what worked for you or what folks should be aware of running containers on AWS? Share here or ping me on Twitter (DMs are open).
UPDATE (2018–02–01): As pointed out by Mark Coleman that with https://hyper.sh there exists a Fargate equivalent and that since 2016!