Saturday, July 10, 2021

AWS: Containers: ECS (Elastic Container Service)

ECS is highly scaled & available container management service using clusters which can run across multiple AZs within same region in existing or new VPC. Amazon ECS lets you launch & stop container-based applications using simple API calls. You can host your cluster on serverless infrastructure by launching services or tasks using Fargate launch type, tasks & instances will be managed automatically. To have more control with you to manage tasks, you can also host your clusters on AWS EC2 using EC2 launch type. Below are a few elements of AWS ECS


  • Containers & Images: To deploy applications using ECS your application must be architected to run in containers. Images are built using a text file which specifies which all components are to be included in the container. Images stored in registry will be run on your cluster

  • Task Definitions: To prepare your application to run in ECS you create Tasks.  Tasks are blueprint of your application. Examples of task definitions are – which containers to use, which launch types to use, ports to be opened, data volumes, etc.

  • Service Definition: Service definition defines how you want to run the tasks

  • Tasks & Scheduling: Amazon ECS task schedular is responsible for placing tasks within your cluster

  • Cluster: It is logical grouping of your AWS resources as shown in below diagram which can be across AZs in a single region

  • Container Agent: It sends information about resources, current tasks and resource utilization to Amazon ECS

  • Amazon ECS can be used along with following related AWS services – IAM, EC2 Auto Scaling, ELB, ECR and Cloud Formation


  • Task Placement Strategies: Algorithm for placing or terminating the tasks in your environment

    • Binpack: based on the least of the amount of CPU or memory available

    • Random: randomly

    • Spread: evenly spread across “field” mentioned in the task strategy

  • Along with strategies ‘Task Placement Constraints’ can also be specified with ‘Constraint Type’ and ‘Attributes’ as a rule for task placement

No comments:

SpringBoot: Features: SpringApplication

Below are a few SpringBoot features corresponding to SpringApplication StartUp Logging ·          To add additional logging during startup...