Ravindra BagaleCourses & study guides मराठी

Chapter 89: Amazon ECS for DevOps

DevOps

89.1 Why ECS — when Kubernetes is more than you need

Story. At a Flipkart-style catalogue API team in Bengaluru, Rohan ran six microservices. A platform lead pushed everyone toward Kubernetes. Rohan's team spent three sprints on Ingress, Helm values, IRSA and node upgrades — and still had only two services live. Priya on a sister team used Amazon ECS on Fargate. She defined a task, attached an Application Load Balancer, and shipped. On-call pages dropped. Kubernetes was not wrong — it was more than that product needed. ECS gave them containers, scaling and AWS IAM without learning pods, Controllers and CNI first. That is why many AWS-only teams pick ECS: less cluster toil when the Kubernetes ecosystem is not a must.

Small team needs containers on AWS. Kubernetes adds control-plane work. ECS ships tasks with less toil.
Small team needs containers on AWS. Kubernetes adds control-plane work. ECS ships tasks with less toil.

Why

Not every product needs the Kubernetes API. If your team lives on AWS and wants containers with clear IAM and load balancing, ECS can be the shorter path.

What

  • ECS — Elastic Container Service. AWS service that runs Docker containers as tasks.
  • Task — One or more containers that start together (like a small pod idea, but ECS vocabulary).
  • Service — Keeps a desired count of tasks running and can attach a load balancer.
  • Cluster — Logical group where your services and tasks run (EC2 capacity or Fargate).
  • EKS — Managed Kubernetes (chapter 88). Different API: kubectl, Deployments, Ingress.

How

  1. Ask: do we need Kubernetes portability and the K8s ecosystem, or AWS containers only?
  2. If AWS-only and a small ops team: start with ECS (often Fargate).
  3. If you already standardised on Helm, Argo CD and kubectl: EKS may fit better (chapter 88).
  4. Either way, put images in ECR and treat prices as approximate on the AWS pricing page.

Example 1: List clusters in a Region

aws ecs list-clusters --region ap-south-1

Output

{
    "clusterArns": [
        "arn:aws:ecs:ap-south-1:123456789012:cluster/shop-prod"
    ]
}

What it shows: At least one ECS cluster exists in ap-south-1. The account id is an example — use yours. Empty list means you have not created a cluster yet.

Example 2: Approximate cost note (not a quote)

ECS control plane: no separate "cluster fee" like EKS's managed control plane charge
You pay for: Fargate vCPU/memory hours, or EC2 instances, plus ALB, NAT, CloudWatch
(approximate — always check the current AWS pricing pages before you budget)

What it shows: ECS pricing shape differs from EKS. EKS bills a managed control plane per cluster (see chapter 88). ECS charges mainly for compute and attached AWS resources. Numbers change — verify officially.

Ravindra Bagale's Tip

Choose ECS when Kubernetes concepts would slow a small AWS-only team. Choose EKS when you need the Kubernetes API and ecosystem.

Quick quiz

Q1. What is Amazon ECS?

Elastic Container Service — AWS runs your containers as tasks and services.

Q2. When might ECS beat EKS for a team?

When they need containers on AWS without Kubernetes control-plane and ecosystem work.

Q3. Why mark prices approximate?

AWS pricing changes; always check the current official price pages.

Did you understand? Let us try it once more.