Bird
0
0

In an AWS Fargate task definition, how should you correctly specify the CPU and memory requirements?

easy📝 Syntax Q3 of 15
AWS - ECS and Fargate
In an AWS Fargate task definition, how should you correctly specify the CPU and memory requirements?
A"cpu": "512", "memory": "1024"
B"cpu": 512, "memory": 1024
C"cpu": "0.5 vCPU", "memory": "1 GB"
D"cpu": "512MB", "memory": "1GB"
Step-by-Step Solution
Solution:
  1. Step 1: Understand Fargate CPU and memory format

    Fargate requires CPU and memory values as strings representing CPU units and MiB respectively.
  2. Step 2: Analyze options

    "cpu": "512", "memory": "1024" correctly uses strings with numeric values representing CPU units (512) and memory in MiB (1024). "cpu": 512, "memory": 1024 uses numbers without quotes, which is invalid JSON for this context. Options C and D use incorrect units or formats not accepted by Fargate.
  3. Final Answer:

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

    CPU and memory must be strings with numeric values [OK]
Quick Trick: Specify CPU and memory as strings with numeric values [OK]
Common Mistakes:
  • Using numeric values without quotes
  • Specifying units like 'GB' or 'MB' instead of MiB
  • Using decimal or fractional CPU values

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes