Updated: Nov 10, 2020
In this article we shall look into what Amazon ECS is, Containerization, Fargate, launching of ECS and its benefits in a summarized presentation slider format. I hope this will be very much useful for beginners and for those who prepare for AWS exams.
What is Elastic Container Service (ECS)?
Amazon ECS is a highly scalable and fast container service where you can run, stop and manage containers.
High performance container management service that supports Docker containers and allows you to easily run applications on a managed cluster of Amazon EC2 instances.
Define containers as tasks and run tasks as tasks or as services.
You can run the tasks and services on a cluster of instances (ECS) or on a serverless infrastructure (Fargate).
You can launch or stop containers with simple API calls
What is a Container?
Container technology, also simply known as just a container, is a method to package an application so it can be run, with its dependencies, isolated from other processes.
A container consists of an entire runtime environment: an application, plus all its dependencies, libraries and other binaries, and configuration files needed to run it, bundled into one package.
By containerizing the application platform and its dependencies, differences in OS distributions and underlying infrastructure are abstracted away.
What is Fargate?
Fargate manages the availability of containers for you. You just define your application’s requirements, select Fargate as your launch type in the console or CLI, and Fargate takes care of all the scaling and infrastructure management required to run your containers.
With AWS Fargate, you no longer have to select Amazon EC2 instance types, provision and scale clusters, or patch and update each server. You do not have to worry about task placement strategies, such as bin-packing or host spread and tasks are automatically balanced across availability zones.
How does ECS work?
Register a task definition which is the blue print of your application. Every time you launch, you specify the task definition so that ECS knows which docker image to be run for containers, number of containers and resource allocation for the containers.
Create a cluster, which is a logical group of tasks, services and container instances.
Create a service which enables you to run and maintain a specified number of instances of a task definition simultaneously in a cluster.
View your service. The service is a web-based application so you can view its containers with a web browser.
What a Container Instance looks like?
A container instance consists of a EC2 instance in which Docker runs in daemon mode.
The application images are stored in a repository which could be either Docker Hub or Elastic Container Repository (ECR) or GitHub.
The images are pulled from the repository and run as containers.
An ECS agent runs in each EC2 instance of a cluster, which connects the container instance to the Cluster.
A typical scenario
Some Use cases for ECS and Fargate
Benefits of ECS
I believe the above information in presentation slider format will be helpful for beginners and AWS exam preparation. The above is just key information on Amazon ECS. For more detailed information, I would recommend you to study the documentation provided by Amazon.
Please provide your comments on the above article and share it with your known groups if you liked it. Thank You