Bird
0
0

Which of the following is the correct way to specify CPU and memory for a Fargate task definition?

easy📝 Configuration Q12 of 15
AWS - ECS and Fargate
Which of the following is the correct way to specify CPU and memory for a Fargate task definition?
A"cpu": 512, "memory": 1024
B"cpu": "512", "memory": "1024"
C"cpu": "0.5", "memory": "1GB"
D"cpu": "512MB", "memory": "1GB"
Step-by-Step Solution
Solution:
  1. Step 1: Check Fargate task definition format

    Fargate expects CPU and memory as strings representing CPU units and MiB memory, e.g., "512" and "1024".
  2. Step 2: Evaluate options

    "cpu": "512", "memory": "1024" uses strings with numeric values, which is correct. Using numbers instead of strings is incorrect. Decimal values for CPU or units like GB/MB are invalid.
  3. Final Answer:

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

    CPU and memory as strings = B [OK]
Quick Trick: CPU and memory must be strings in task definition [OK]
Common Mistakes:
  • Using numbers instead of strings
  • Adding units like MB or GB
  • Using decimal numbers for CPU

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes