Amazons EC2 (ECS) Container Service Supporting Docker (Part 2)

If you would like to read the first part in this article series please go to Amazons EC2 (ECS) Container Service Supporting Docker (Part 1).

In the previous article in this series we covered details around what containerisation is for applications and how this emerging technology is making a difference to the cloud platforms as we know them.

Virtual machines have been with us for over 15 years and now the time has come to separate the applications from the operating systems and run them independently on any hardware stack and any VM hosting environment independent of the underlying platforms. All this outside of the OS. Does this mean the OS is obsolete when hosting? Well not quite yet but the industry is starting to move in that direction.


This two-part article aims to provide an overview of the AWS EC2 container service (ECS) and what this means for users of Docker as we move away from utilising virtual machines toward a container centric approach.

In part one of the series we looked at container technology, virtual machines and the relationship between Docker and Amazon. In this article, part two; we consider the Amazon EC2 Container Service in more detail.

Containers are a tangible architectural method for administration of cloud-based applications and infrastructure and as time progresses and enterprises become more confident in this approach it’s in the best interest of providers of cloud services, like Amazon, to be in a strong position to support this type of technology, consequently the provisioning of the AWS EC2 container service (ECS).

Looking ahead, the likelihood is that there will be many more Docker containers running in the cloud compared with virtual machines, someone will need to manage these, and hence the growing interest from large entities such as Amazon.

Users of Docker containers appreciate the flexibility that the Amazon EC2 Container Service provides to be able to extend the containers to the AWS cloud and extend the benefits of the AWS to Docker.

AWS EC2 Container Service Unwrapped

In a nutshell the Amazon container service is a container management service that supports Docker containers in a manner that is extremely scalable and facilitates high performance levels. The service is free to use, however you are required to pay for the AWS resources that you will require to store and run the applications.

Some terminology to get your head around for a better understanding of ECS

Amazon and AWS have a gamut of terms unique to their services. Below are a few terms explained, to comprehend, related to the components of AWS EC2 container service.

Cluster – A cluster is a collection of EC2 instances in a particular AWS Region, which are managed by the Amazon ECS and can exist in more than one Availability Zone. (A cluster is a collection of compute, storage and networking resources that serve as a host for the application/s in the container)

Container instance – This is an Amazon EC2 instance that is running the Amazon ECS agent and has been registered into a cluster

Scheduler – A scheduler is associated with each cluster. The scheduler (one associated with each cluster) facilitates the management of the resource use in the cluster in a way that encourages improved performance and availability.

Task Definition – This is a description of an application that contains a single or multiple container definitions

Task – This is aninstantiation of a task definition that is running on a container instance

Container – The Docker packaged application constituent created as part of a task. Each EC2 instance in a cluster can serve as a host to a single or multiple containers.

The recommended Amazon ECS workflow

The following steps should simplify getting started with the Amazon container service. These steps on how to get started are well documented and explained by Amazon ensuring you are up and running as quickly as possible.

  1. Cluster creation (create or use default cluster)
  2. Launch and Instance with Amazon ECS AMI
  3. List the Container Instances
  4. Describe your Container Instance
  5. Register a Task Definition
  6. List Task Definition
  7. Run Task
  8. List Task
  9. Describe the Running Task
  10. Examine the Task with Docker

What ECS aims to do?

EC2 Container Service helps the user/developer to:

  • Facilitate running of distributed applications on a managed cluster of Amazon EC2 instances
  • Control the initiation and termination of container-enabled applications via simple API calls
  • Use a centralised service to inquire the state of the cluster
  • Allow for access to the features of EC2 to assist with security procedures (Security groups, EBS volumes and IAM roles)
  • Facilitate scheduling (assigning tasks to instances) of containers using the EC2 Container Service, according to requirements and resources anticipated for a particular time optimising performance
  • Transport of containers from the AWS platform to on premise infrastructure (vice versa)
  • Utilise AWS integration and take advantage of AWS resources/features
  • Facilitate management of clusters and configurations without operating your own
  • Enable scaling without the concern of scaling your own management infrastructure
  • Run in a secure and efficient AWS environment

Amazon attributes the following benefits to its EC2 Container Service:

High performance and improved scalability

Containers in there thousands can be initiated, terminated and managed in a matter of seconds.

Scheduling that is flexible

EC2 container service includes a scheduler to help balance resource requirement/use and availability across your cluster. This can be automated, done manually or customised to meet precise requirements.

Simplifies management of clusters

The container service sets up and manages cluster (collective resources) comprised of Docker containers. Allows for initiation, termination and is easily scalable across multiple Availability Zones. There is no need to self manage or configure a management system for cluster management.

Efficiently use and manage resources

The employment of container technology lends itself to efficient resource utilisation. The service allows you to run many containers; they don’t have to be related in any way, on the same EC2 instance for efficient resource use.


Containers are not yet as secure as VMs but with the Amazon container service the EC2 instances run within an Amazon Virtual Private Cloud (VPC) and you can take advantage of all the associated security features (IAM roles, security groups etc.). In the VPC you have increased security, reliability and complete control. Some will argue that there is not the whole OS foot print and that they are more secure as discreet applications but this is still being devised as a concept due to the additional features the OS offers over and above the standard security controls.

Improved portability

EC2 Container service offers easy integration and allows for comprehensive control and transparency into AWS resources so that you can swiftly move between AWS cloud and on premise workloads.

AWS integration

Your applications can make use of other AWS features


Jointly, Docker and Amazon bring together the best of both worlds to provide a technology and service that encompasses all the characteristics that the user is looking for, performance, scalability, flexibility, control, security and speedy convenience. Benefits are accentuated through the container technology and the ability to expand into the AWS cloud environment and extend its resources and capabilities to Docker containers.

Amazon and Docker have future plans for further integration and on-going collaboration between the EC2 container service/AWS and Docker services to further improve the usability and the service provided to achieve the comprehensive advantage of container-based applications, deployment and management.

The future for Docker, Amazon and the developer holds great promise.

If you would like to read the first part in this article series please go to Amazons EC2 (ECS) Container Service Supporting Docker (Part 1).

Leave a Comment

Your email address will not be published.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top