About AWS Elastic Container Service (ECS)

3 min readMar 14, 2023

Amazon Web Services (AWS) Elastic Container Service (ECS) is a fully managed container orchestration service that enables you to run, deploy, and manage containerized applications on a scalable and secure infrastructure. ECS is an ideal choice for deploying microservices-based applications, batch processing jobs, and machine learning models.

Run Containers in two different ways:

1- Using the EC2 launch type or the Fargate launch type.

The EC2 launch type allows you to run your containers on EC2 instances that you manage, while the Fargate launch type allows you to run your containers without the need to manage any underlying infrastructure.

How to create ECS (EC2 or Fargate):

1- You need to create a cluster, which is a logical grouping of resources such as EC2 instances or Fargate tasks.

2- Once you have created a cluster, you can then create a task definition, which is a blueprint that specifies how your containers should be run.

3- The task definition includes information such as the container image, memory and CPU requirements, port mappings, and any environment variables.

4- After you have created a task definition, you can then create a service, which is a long-running task that ensures that a specified number of containers are running and healthy at all times.

5- A service can be configured to automatically scale up or down based on demand, and it can be integrated with a load balancer to distribute traffic across multiple containers.

ECS monitoring and logging:

ECS also provides a rich set of monitoring and logging capabilities, allowing you to track the performance and health of your containers and applications. You can use Amazon CloudWatch to monitor metrics such as CPU and memory utilization, and you can use Amazon CloudTrail to track API calls and changes to your ECS resources. You can also use AWS X-Ray to trace requests and diagnose performance issues in your application.


AWS ECS is a powerful and flexible container orchestration service that simplifies the deployment and management of containerized applications. With ECS, you can easily run and scale your applications, integrate with other AWS services, and monitor and troubleshoot your containerized workloads. If you are looking to deploy containers on AWS, ECS is definitely worth considering.




AWS & DevOps Architect | Linux, Docker, Kubernetes, Terraform, Jenkins, Git&GitHub, Ansible expert