DOP-C02 Configuration Management and IaC Practice Question
A DevOps engineer is designing a CI/CD pipeline for an application that runs on Amazon ECS. The pipeline should automatically build a Docker image from source code, push it to Amazon ECR, and deploy it to the ECS service. The engineer wants to use AWS CodePipeline with Amazon ECR as a source. Which action provider should be used for the deploy stage?
⚠ Common exam trap
It's easy for candidates to confuse the Amazon ECS deploy action with AWS CodeDeploy, but CodeDeploy is only required for ECS blue/green deployments, while the Amazon ECS action directly handles rolling updates and is the simplest choice for standard ECS service deployments.
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
✓
Amazon ECS
Amazon ECS is the correct action provider for the deploy stage when using AWS CodePipeline because it directly integrates with ECS to update an existing ECS service with a new task definition. When Amazon ECR is configured as a source, CodePipeline detects image pushes, and the ECS deploy action automatically triggers a rolling update of the ECS service using the new image, without requiring additional deployment tools.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
AWS CloudFormation
Why it's wrong here
AWS CloudFormation provisions and manages infrastructure as code, so it could be used to update an ECS service if you modify the TaskDefinition and Service resources in a template. However, the CodePipeline deploy stage for a prebuilt container image should invoke the Amazon ECS deploy action provider, which performs a direct UpdateService call and registers the new task definition. CloudFormation is a correct infrastructure provisioning tool, not the native deploy action for an ECS service in a pipeline.
- ✗
AWS CodeDeploy
Why it's wrong here
The plain AWS CodeDeploy deploy action provider in CodePipeline is designed for EC2/on-premises and Lambda targets; it is not the correct choice for an ordinary ECS service rolling deployment. Although CodeDeploy has a separate ECS blue/green compute platform, that is wired through the dedicated 'Amazon ECS (Blue/Green)' action provider rather than the standard CodeDeploy deploy action. For a simple ECS service update, you should choose the Amazon ECS provider instead.
- ✓
Amazon ECS
Why this is correct
The Amazon ECS deploy action provider is the native integration in CodePipeline for pushing a new container image or task definition to an existing ECS service. When this action runs, it registers the revised task definition and calls UpdateService so the service starts a deployment with the new image. This makes it the correct, minimal-action choice for an ECS-based application pipeline, as it avoids abstracting the deployment behind another compute platform.
- ✗
AWS Elastic Beanstalk
Why it's wrong here
AWS Elastic Beanstalk is a PaaS offering that deploys applications to its own managed infrastructure, typically EC2 instances or pre-built platform environments, and it is not a service inside ECS. Using Elastic Beanstalk as the pipeline deploy action would target Beanstalk environments, not an ECS cluster or service. Therefore it would not update the ECS service the DevOps engineer is building the pipeline to support.
Go deeper
Related to this question
About these practice questions
One of 1,298 original DOP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.