Amazon ECS turns Docker containers into the new VMs

Amazon's ECS launches Docker containers directly in EC2 instances, with automated clustering, scheduling, and management

cranes at commercial dock cargo containers shipping commerce trade transportation dv790010
Credit: Getty Images

After Google went all-in on Docker with Container Engine, it was only a matter of time before Amazon took similar action. In Thursday's keynote speech at AWS Reinvent, Amazon unveiled the EC2 Container Service (ECS), currently available as a technology preview.

Rather than create a new deployment system specifically for Docker, Amazon uses the existing infrastructure of EC2 instances to deploy and manage containers. Docker-ized apps can be launched and managed in clusters of EC2 instances that span multiple Availability Zones, and different instance types can be mixed for operational efficiency.

Using ECS incurs no extra charges, apart from the cost of spinning up EC2 instances.

It's not clear if Amazon is using a custom build or is repurposing an existing container-based solution like CoreOS within the EC2 instances to run Docker. Whatever the case, Amazon implies it's a lightweight solution; its blog post about ECS states that "a single mid-sized EC2 instance has sufficient resources to be used productively as a starter cluster."

The post also notes that the Docker client used in ECS is the same one deployed elsewhere by Docker users, so Docker workloads can be moved to and from Amazon without issues.

While EC2 machines are unlikely to be deprecated anytime soon in favor of containers, Amazon stated that the way ECS containers can access AWS features like resource tags make them "in effect, a new base-level building block in the same vein as EC2 and S3."

Amazon has emphasized ECS's programmability and integratability in other ways. A set of containers, their requirements, and their behaviors can be defined by way of a JSON file or a Task Definition. Said definition can then be used to launch any number of container groups, whether manually, through ECS's scheduler, or with the ECS APIs through a third-party mechanism.

Amazon didn't go it alone when adding Docker to EC2. Ben Golub, CEO of Docker, took the stage during the keynote to discuss ECS and the close affiliation between Amazon and Docker that appears to be in its first stages. In a blog post released later that day, Golub made note of the mutual benefits for Docker and Amazon users, such as direct access to applications for AWS users in Docker Hub.

"The initial focus of the Amazon EC2 Container Service," Golib wrote, "is to address multi-container, multi-host clustering, which aligns with customer requirements for high-performance and scale as they move their Dockerized distributed applications into production. ... Amazon and Docker have a longer-term plan to provide close integration between the Amazon EC2 Container Service and the growing ecosystem of Docker-based services."

ECS constitutes a shot at rival cloud services, notably Google and Microsoft, adding container support. But Amazon also is taking aim at stand-alone Linux vendors like Red Hat, Canonical, Suse, and CoreOS, all of which have been reinventing their respective distributions to become more container-centric.

Rather than have customers use those Linuxes on their own or place an instance of those Linuxes in EC2 and use that to manage containers, Amazon wants customers to launch containers directly in EC2, without the overhead of OS or cluster management -- albeit at the cost of being more dependent on the Amazon way.

Another service that may face competition from ECS is AWS Elastic Beanstalk, Amazon's deployment system for Web applications. The service was recently upgraded to support Docker-ized applications, but may spark interest outside of ECS. For one, it has the slight advantage of supporting applications that run on both Linux and Windows Server, whereas Docker is currently Linux-only --- though that's about to change.

From CIO: 8 Free Online Courses to Grow Your Tech Skills