Bird
0
0

You want to define a task with a container that requires 1GB memory and 0.5 vCPU. How should you set the "memory" and "cpu" values in the task definition?

hard📝 Application Q9 of 15
AWS - ECS and Fargate
You want to define a task with a container that requires 1GB memory and 0.5 vCPU. How should you set the "memory" and "cpu" values in the task definition?
A"memory": 1024, "cpu": 0.5
B"memory": 1, "cpu": 0.5
C"memory": 1024, "cpu": 512
D"memory": 1, "cpu": 512
Step-by-Step Solution
Solution:
  1. Step 1: Understand ECS units for memory and CPU

    Memory is in MiB (1GB = 1024 MiB); CPU is in CPU units (1024 units = 1 vCPU).
  2. Step 2: Convert requirements to ECS units

    1GB memory = 1024; 0.5 vCPU = 512 CPU units.
  3. Final Answer:

    "memory": 1024, "cpu": 512 -> Option C
  4. Quick Check:

    Memory in MiB, CPU in units (1024 units = 1 vCPU) [OK]
Quick Trick: Memory in MiB, CPU in units (1024 units = 1 vCPU) [OK]
Common Mistakes:
  • Using GB or fractional CPU directly
  • Mixing units for CPU and memory

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes