Question 910 of 1,750
SDLC AutomationeasyMultiple ChoiceObjective-mapped

DOP-C02 imagedefinitions.json Practice Question

This DOP-C02 practice question tests your understanding of sdlc automation. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. A key principle to apply: imagedefinitions.json. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A DevOps engineer is setting up a CI/CD pipeline for a Node.js application. The application must be built, tested, and deployed to an Amazon ECS cluster. The team wants to use AWS CodeBuild to run unit tests and package the application as a Docker image, and AWS CodePipeline to orchestrate the workflow. Which artifact type should CodeBuild output to be used by a subsequent CodePipeline action?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

A Docker image pushed to Amazon ECR.

Option A is correct because in a CodePipeline workflow that deploys a Dockerized application to Amazon ECS, the CodeBuild action should push the Docker image to Amazon ECR. The subsequent ECS deploy action in CodePipeline directly uses the image URI from ECR to update the ECS task definition and deploy the container. While CodeBuild can also output a configuration file, the primary artifact that enables the deployment is the Docker image stored in ECR, which is referenced by the deploy action.

Key principle: imagedefinitions.json

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • A Docker image pushed to Amazon ECR.

    Why this is correct

    Correct. CodeBuild outputs an artifact (e.g., imagedefinitions.json) that references the image in ECR, which the ECS deploy action uses.

    Related concept

    imagedefinitions.json

  • A zip file containing the application source code.

    Why it's wrong here

    Incorrect. A zip file of source code would not contain the imagedefinitions.json needed for ECS deployment.

  • A tarball stored in Amazon S3.

    Why it's wrong here

    Incorrect. A tarball stored in S3 without the imagedefinitions.json file cannot be used by the ECS deploy action.

  • A JSON file with the image details.

    Why it's wrong here

    Incorrect. While a JSON file with image details is close, the artifact must be specifically named imagedefinitions.json with the correct format to be recognized by CodePipeline.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap is that candidates may think CodeBuild passes the Docker image itself as an artifact, but in reality, the artifact is a configuration file (imagedefinitions.json) that tells the ECS deploy action which image to use.

Detailed technical explanation

How to think about this question

Under the hood, CodePipeline's ECS deploy action reads the imagedefinitions.json file from the input artifact to determine which Docker image to deploy. This file must contain an array of objects with 'name' (matching the container name in the task definition) and 'imageUri' (the full ECR image URI with tag). CodeBuild can generate this file automatically using the buildspec's 'artifacts' section with 'files: imagedefinitions.json' and a post_build command like 'printf '[{"name":"my-container","imageUri":"%s"}]' $REPOSITORY_URI:$TAG > imagedefinitions.json'. A common real-world pitfall is forgetting to include the image tag, causing the deploy action to pull the wrong version.

KKey Concepts to Remember

  • imagedefinitions.json
  • CodeBuild artifact
  • ECS deploy action

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

imagedefinitions.json

Real-world example

How this comes up in practice

A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.

What to study next

Got this wrong? Here's your next step.

Review imagedefinitions.json, then practise related DOP-C02 questions on the same topic to reinforce the concept.

Related practice questions

Related DOP-C02 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free DOP-C02 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this DOP-C02 question test?

SDLC Automation — This question tests SDLC Automation — imagedefinitions.json.

What is the correct answer to this question?

The correct answer is: A Docker image pushed to Amazon ECR. — Option A is correct because in a CodePipeline workflow that deploys a Dockerized application to Amazon ECS, the CodeBuild action should push the Docker image to Amazon ECR. The subsequent ECS deploy action in CodePipeline directly uses the image URI from ECR to update the ECS task definition and deploy the container. While CodeBuild can also output a configuration file, the primary artifact that enables the deployment is the Docker image stored in ECR, which is referenced by the deploy action.

What should I do if I get this DOP-C02 question wrong?

Review imagedefinitions.json, then practise related DOP-C02 questions on the same topic to reinforce the concept.

What is the key concept behind this question?

imagedefinitions.json

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More DOP-C02 practice questions

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This DOP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DOP-C02 exam.