Everything you Need to Know About Docker on Amazon ECS

AWS-ECS-docker
ECS is all about building a production scale, auto scaling as well as monitoring the platforms to run different types of containers. In this guide, we will take some time to discuss the different components of EC2 Container Service (ECS) and how they fit in together like the pieces of a puzzle.
The main motive is to understand how to host, scale and load an application using Docker and ECS.

What is Amazon ECS?
Amazon’s ECS service is a container management service, which is not only easy to run, and stop, but also assists in managing Docker containers on a cluster of Amazon EC2 instances.
ECS integrates well with the AWS infrastructure, thereby allowing the users to operate their own cluster of Amazon EC2 instances. ECS is a managed service, which helps assist the deployment of containers without worrying about the infrastructure.

Components of ECS Docker:
• Cluster
• Container Instances: A container instance is ideal for running containers
• Container Agent
• Task Definition
• Service
• Task

How ECS components are connected?
Outside the main components, there are a series of supporting components, which makes it easier to fit in the puzzle.
• Elastic Application Load Balancers
• AutoScaling Groups
• Launch Configurations
• CloudWatch Alarms (for Auto Scaling)

Deploying your first task effectively
• Creating an ECS task
Within ECS, the Docker workloads are often categorized as tasks, which further contain multiple containers. All these task containers are usually located on the same machine.
• Define the service
By defining a service, one can understand how many task instances need to be run within the cluster.
• Create an ECS Cluster
Since tasks run on a container, these instances need to be registered within a cluster. This way, a cluster can be used to scale the cluster up and down, especially when it comes to running more containers.
• Create the stack
The final stack is the final screen of the wizard, which is just a summary of the task created, the service which was defined and the cluster configuration.