Bird
0
0

Which of the following is the correct JSON snippet to define a container image in an ECS task definition?

easy📝 Configuration Q12 of 15
AWS - ECS and Fargate
Which of the following is the correct JSON snippet to define a container image in an ECS task definition?
A"docker_image": "myrepo/myapp:latest"
B"image": "myrepo/myapp:latest"
C"img": "myrepo/myapp:latest"
D"container_image": "myrepo/myapp:latest"
Step-by-Step Solution
Solution:
  1. Step 1: Recall ECS task definition JSON format

    The correct key for specifying the container image is "image" inside the container definitions.
  2. Step 2: Check each option's key

    Only "image": "myrepo/myapp:latest" uses the correct key "image". Others use incorrect keys not recognized by ECS.
  3. Final Answer:

    "image": "myrepo/myapp:latest" -> Option B
  4. Quick Check:

    Container image key = "image" [OK]
Quick Trick: Use "image" key exactly for container images in task definitions [OK]
Common Mistakes:
  • Using incorrect keys like "container_image" or "img"
  • Confusing task definition keys with Dockerfile syntax
  • Misspelling the key name

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes