Search code examples
amazon-web-servicesamazon-ecs

Why doesn't AWS ECS Fargate have instance type?


When I configure ECS fargate task, I can configure CPU and Memory value but I can't specify the instance type like c5.large etc. The value for CPU is something like 256, 1024, etc. In its price page: https://aws.amazon.com/fargate/pricing/, the price is measured by vCPU which value is 0.5, 1, 2 etc. Is 1024 CPU Units equal to 1 vCPU? Why doesn't Fargate have instance type which will make think easier to understand and consistent? If I configure it to be 2048 CPU units + 4 GB memory, does it equal to c5.large?


Solution

  • Based on the comments.

    Fargate is an ECS equivalent of Lambda. You don't manage the instances directly. Instead you choose CPU and the corresponding memory. AWS will take care of provisioning the hardware to meet your specification.

    Useful CPU and memory units combinations, as well as their relation to vCPUs is here:

    256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)
    
    512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)
    
    1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
    
    2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB)
    
    4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB)