I went through the Deploy Docker Containers Tutorial.
Heres what I've learned.
To deploy docker containers on the AWS , you need the following items:
- Amazon ECS (Elastic Cluster Service).
- an Identity and Access Management (IAM) role service account role will be automatically be created for this (atleast for the sample tutorial)
- This will allow ECS to make calls to EC2 and LoadBalancer to register so they can communicate with eachother.
- ec2 Instance
- Where the Docker container will be executed
- Load balancer
ECS Terminology - Terminology taken from Here
- Task definition — This a blueprint that describes how a docker container should launch. It contains settings like exposed port, docker image, cpu shares, memory requirement, command to run and environmental variables.
- Task — This is a running container with the settings defined in the Task Definition. It can be thought of as an “instance” of a Task Definition.
- Service — Defines long running tasks of the same Task Definition. This can be 1 running container or multiple running containers all using the same Task Definition.
- Cluster — A logic group of EC2 instances. When an instance launches the ecs-agent software on the server registers the instance to an ECS Cluster. This is easily configurable by setting the ECS_CLUSTER variable in /etc/ecs/ecs.config described here.
- Container Instance—This is just an EC2 instance that is part of an ECS Cluster and has docker and the ecs-agent running on it.
Overview of ECS terminology

Picture taken from Here
Amazon ECS's responsiblity is to ensure that the Docker application is deployed and executed to all Instances in the cluster. Since the idea behind it is running an application as a service, it Amazon ECS will try to auto-recover if by any means it so happens to crash.
Elastic Cluster Service is AWS's version of Kubernetes. The differences between them is that ECS is tightly coupled to the AWS architechure, while Kubernetes is Vendor agnostic. Meaning, I can run Kubernetes on various Cloud platforms such as Google, Azure, DigitalOcean, and even on a private, personal cluster. I can assume if someone decided to use the Kubernetes they could essentially move around to different Cloud platforms and not have their application be too much affected. Where if you develop your application using ECS, you are kind of stuck with Amazon's platform, forever.
From what I've also read online, that Kubernetes is very modularized when it comes to using different services. For example, Kuberenetes you have multiple options for choosing which Load balancer service you would like to use in your cluster, but the ECS forces you to use the AWS's Elastic Load balancer service.
As I am just starting out, I do not have enough adequate knowledge to validate which is actually better, but I can make a very random assumption is that Kubernetes will take time configuring your cluster to the way you want it, while ECS will be able to handle connections to other services much easier as it already knows what to do.
After I go through the Docker tutorials, I think I might go ahead and see if I can create Kubernetes cluster to compare the differences in not only the setup, but the functionality.
References: