Bird
0
0

Given this Fargate task definition snippet:

medium📝 service behavior Q13 of 15
AWS - ECS and Fargate
Given this Fargate task definition snippet:
{"cpu": "256", "memory": "512", "containerDefinitions": [{"name": "app", "image": "myapp:latest"}]}

What happens if you try to run this task with 1024 MiB memory requested in the service?
AThe task runs with 512 MiB memory as defined in the task.
BThe task runs but may be terminated if it exceeds 512 MiB.
CThe task fails to start due to memory mismatch.
DThe service overrides the task memory to 1024 MiB automatically.
Step-by-Step Solution
Solution:
  1. Step 1: Understand memory settings in Fargate

    Memory is defined in the task definition and must match the service configuration; mismatches cause failures.
  2. Step 2: Analyze the mismatch

    The task requests 512 MiB, but the service requests 1024 MiB, causing a conflict and preventing the task from starting.
  3. Final Answer:

    The task fails to start due to memory mismatch. -> Option C
  4. Quick Check:

    Memory mismatch causes failure = D [OK]
Quick Trick: Task and service memory must match exactly [OK]
Common Mistakes:
  • Assuming service overrides task memory
  • Thinking task runs with lower memory
  • Ignoring mismatch errors

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes