Abstract


  • A lightweight container orchestration service
  • We can mount Volume to it for data that can’t be lost when Container is terminated

Components


Container

  • We can obtain a shell into it using ECS Exec
  • Obtain Private IP of the container, must have curl && jq
containerPrivateIP=$(curl $ECS_CONTAINER_METADATA_URI | jq -r '.Networks[0].IPv4Addresses[0]') >/dev/null 2>&1

Task

  • A logical grouping of one or more Container

Task Definition

Hardware Details

  • "cpu": 256 means 256/1024 vCPU
  • Click here to find out more about the hardware configuration

Service

Defines

Terminologies


Volume

  • 2 types - Bind Mounts & EFS Volumes
  • ECS Fargate can only use EFS Volumes, Bind Mounts are local file system volumes mounted directly from the host to the container. But ECS Fargate is Serverless

Fargate

  • The serverless version of ECS
  • The one and only one Deployment Strategy is Spread
  • Doesn’t have control over Deployment Strategy like the ECS powered by EC2. Because Fargate is serverless, so we don’t really have to consider which az’s ec2 instance has more cpu power, thus deploy new task to that ec2 in that az