DOP-C02 Incident and Event Response Practice Question
A company's DevOps team uses AWS CodePipeline to automate deployments. A recent pipeline execution failed at the 'Deploy' stage. The engineer needs to view the detailed logs for the failed action. Which AWS service or feature should the engineer use?
⚠ Common exam trap
Test-takers frequently confuse CloudTrail (audit logs) with CloudWatch Logs (operational logs), or assume that CodeBuild logs cover all pipeline stages, when in fact each stage type (e.g., Deploy) has its own log destination.
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
✓
CloudWatch Logs
AWS CodePipeline integrates with Amazon CloudWatch Logs to capture and store detailed execution logs for each pipeline action, including the 'Deploy' stage. When a deployment action fails, the engineer can view the associated logs directly from the CodePipeline console or via the CloudWatch Logs console, which provides granular error messages, timestamps, and stack traces necessary for troubleshooting. This is the designated service for accessing action-level logs in CodePipeline.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
CloudWatch Logs
Why this is correct
CodePipeline natively publishes execution-level log events to Amazon CloudWatch Logs, including stage start/end timestamps, action state transitions, and failure diagnostics. This provides a centralized, queryable repository that can be filtered with CloudWatch Logs Insights, used for metric filters and alarms, and retained beyond the console's default history. Because these logs capture the pipeline's own runtime behavior, they are the authoritative source for troubleshooting execution details.
- ✗
S3 access logs
Why it's wrong here
S3 access logs record HTTP requests made to buckets, such as GETs and PUTs for source artifacts or build outputs. While CodePipeline may use S3 as an artifact store, these logs only reveal object-level access patterns and do not contain stage transitions, approval actions, or failure reasons. For instance, a successful artifact upload would appear, but you could not distinguish which stage invoked it or why a deployment failed.
- ✗
CodeBuild logs
Why it's wrong here
CodeBuild logs capture the output and build-phase details from an individual CodeBuild project, which is a distinct service from CodePipeline. If a build action is part of a pipeline stage, those logs show compiler output, environment variables, and build commands, but they do not include the deploy stage's execution or the pipeline's orchestration events. A pipeline may have no CodeBuild action at all, rendering this source empty for deploy-stage troubleshooting.
- ✗
CloudTrail
Why it's wrong here
CloudTrail records API activity against AWS services, including CodePipeline actions like CreatePipeline, StartPipelineExecution, and UpdatePipeline. Those events capture who made the call, from which IP address, and when, but they do not contain application-level execution details such as how each stage progressed or why it was paused. Therefore, CloudTrail is useful for auditing administrative actions, not for tracing the internal runtime state of a deployment.
Go deeper
Related to this question
About these practice questions
One of 1,013 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.