Skip to content

ECS – Elastic Container Service

Pricing

  • ECS orchestration is free, you only pay for underlying compute -> EC2 or Fargate
  • For Fargate you pay -> per vCPU and Memory (Billing Period -> Container pull begins to Task termination)
  • For EC2 (managed) -> EC2 costs + $0.02/hr and EC2(Launch Type) -> EC2 Costs only

Note

You also pay for Cloudwatch, Load Balancer if you also configure them (you almost always do in production). For detailed information, see this blog.

Notes

  • ECS is container orchestrator by AWS -> only works inside AWS
  • Easy to start with and intregate well in AWS ecosystem -> AWS manages
  • Major drawback is the manifests (task definitions) are limited to ECS -> you can’t migrate infra or manifest to other cloud providers or K8s cluster
  • Not feature rich and lacks Custom Resources Definition as in K8s -> because K8s is open source, ECS is proprietary

Terminologies

  • Task Definition -> Definition of how Task should look like (how many containers, what platform, volumes, networking, etc.)
  • Tasks -> Similar to Pods, smallest unit of Deployment
  • Services -> Adds value to Tasks like Replicas, LB, etc. (similar to Services in K8s)
  • Cluster -> One or more machines working together to orchestrate containers

General Flow

  1. Create Task Definition
  2. Create Cluster
  3. Add Tasks and Services to Cluster
  4. Start Tasks and Services

Note

The cluster should have required permission and networking (either be behind NAT or issue Public IP being able to reach IGW) to pull image from the registry.

Last updated on