ladderlore
လမ်းညွှန် တောင်းဆိုရန်
  • S3 သို့မဟုတ် IAM လို service အမည်ကို ရိုက်ထည့်ပါ။

Service · Containers · CLF-C02 အပေါ် ဆက်လေ့လာရန်

Amazon Elastic Container Service (Amazon ECS)

Choose Fargate or EC2, pick the right IAM role, and scale services behind a load balancer.

ဒီသင်ခန်းစာကို မြန်မာဘာသာ မပြန်ရသေးလို့ အင်္ဂလိပ်လို ပြထားပါတယ်။

Cloud Practitioner မှ သင်သိပြီးသားများ

  • Managed orchestration. A task definition is the blueprint, a task runs it, a service keeps tasks running.
  • Tasks run on Fargate or on EC2 instances.
  • Works with Amazon ECR and Elastic Load Balancing.
Cloud Practitioner သင်ခန်းစာကို ဖတ်ရန်
  1. 1A user sends a request.
  2. 2The load balancer forwards it to a task in the target group.
  3. 3ECS pulls the image from Amazon ECR when a task starts, using the task execution role.
A request reaches a task, and the image comes from the registry.
  • Servers

    Fargate
    None to manage
    ECS on EC2
    You run the instances
  • Price

    Fargate
    Task vCPU and memory, per second
    ECS on EC2
    Per instance. Savings Plans, Spot
  • Hardware

    Fargate
    No GPUs. Up to 32 vCPU, 244 GB
    ECS on EC2
    GPUs and any instance type
  • Scaling

    Fargate
    Task count
    ECS on EC2
    Task count and instance count
Fargate and EC2 launch types compared.

1 / 2

  • Servers

    Fargate
    None to manage
    ECS on EC2
    You run the instances
  • Price

    Fargate
    Task vCPU and memory, per second
    ECS on EC2
    Per instance. Savings Plans, Spot
  • Hardware

    Fargate
    No GPUs. Up to 32 vCPU, 244 GB
    ECS on EC2
    GPUs and any instance type

2 / 2

  • Scaling

    Fargate
    Task count
    ECS on EC2
    Task count and instance count
Fargate and EC2 launch types compared.

ဘာလဲ

With the Fargate launch type, you manage no servers and pay for task CPU and memory. With the EC2 launch type, you run the instances: more control, GPUs, and a lower price at steady high use. A capacity provider can mix them, for example a base of Fargate tasks plus extra tasks on Fargate Spot. ECS Anywhere runs tasks on your own servers, managed from ECS in AWS.

ဘာလဲ

ECS uses two roles. The task execution role lets ECS itself pull images from Amazon ECR, write logs and read secrets. The task role gives the code in the container its own permissions, such as reading an S3 bucket. If the app is denied, fix the task role. If the image cannot be pulled, fix the execution role.

Service auto scaling changes the number of tasks by target tracking, step or scheduled scaling. Each task registers with a target group of an Application Load Balancer. With awsvpc networking, each task has its own network interface and security group. With dynamic port mapping, several tasks of a service can share one EC2 instance.

မှတ်ထားရန်

  • Fargate: no servers. EC2: control over nodes, GPUs, Spot.
  • Task execution role: pull images, write logs. Task role: permissions for your code.
  • Service auto scaling changes the task count. Capacity providers scale the EC2 nodes.
  • Tasks register in an ALB target group as they start.

မှတ်ထားရန်

  • awsvpc mode: each task has its own network interface and security group.
  • ECS Anywhere: run tasks on your own servers.

စာမေးပွဲမှာ

  • “Container cannot read an S3 bucket” points to the task role.
  • “Container image cannot be pulled” points to the task execution role.
  • “Run containers on premises, managed from ECS” points to ECS Anywhere.
  • “No servers, containers behind a load balancer” points to ECS on Fargate.