ECS – Elastic Container Service

ECS is a container orchestration service that supports Docker and Windows containers. It has deep integration with AWS services IAM, VPC, and Route53.

ECS is a fully managed clustered platform that allows us to run the Docker images in the cloud.

  • The container is more like a virtual operating environment.
  • It has a standardized unit with everything the software needs to be run
  • It is also well suited for microservice, applications are created independently with stateless components

The architecture of Docker Container

Advantages of Container and Micro Services

  • Highly Scalable, we can scale only those resources which have max out, no need to scale out the whole application infrastructure.
  • Fault Tolerance, Error on one component doesn’t impact the other components.
  • Easy to maintain, Easier to maintain compared to the monolithic applications.

Fargate or EC2

  • We have the option to choose the container service,
  • The cluster of the virtual machines, ECS will allow us to run the container on the cluster of virtual machines. It provides you the control over installation, configuration and management of your environment.
  • Fargate can be used for serverless container where you don’t need to worry about the underlying EC2 instance.

ECR – ECR stores the container images, which will be used by the Docker.

ECS Application

  • ECS is used by AWS Sagemaker, LEX and Amazon.com which use ECS for the recommendation engine.
  • To prepare your application to run on Amazon ECS, you must create a task definition.
  • The task definition is a text file (in JSON format) that describes one or more containers (up to a maximum of ten) that form your application.
  • It specifies various parameters for your application. For example, these parameters can be used to indicate which containers should be used, which ports should be opened for your application, and what data volumes should be used with the containers in the task.
  • An Amazon ECS cluster is a logical grouping of tasks or services.