DOP-C02 Practice Question 38: Pipeline Failure EventBridge Notification
AWS Certified DevOps Engineer – Professional (DOP-C02) · Test 4 · question 8 of 10
An organization runs 30 AWS CodePipeline pipelines across one account. The on-call team wants to be notified the moment any build or deploy action in any of those pipelines fails, with the failing pipeline and action identified in the message. The team does not want to edit the 30 pipeline definitions, and does not want a delay of more than a few seconds.
What should the team implement?
Show answer and explanation
Answer:
CodePipeline "reports an event to EventBridge whenever the state of a resource in your AWS account changes", on "a guaranteed, at-least-once basis" for pipeline, stage, and action executions. The documentation gives this exact pattern as a sample "to capture failed deploy and build actions across all the pipelines", matching on detail.state: FAILED and detail.type.category. The event payload carries the pipeline name, stage, action, and execution ID, so the notification identifies what failed. One rule covers all 30 pipelines and nothing in any pipeline definition changes.
Option A does not work even if the team were willing to edit every pipeline. A final action only runs when the pipeline reaches it, when a build or deploy action fails, the pipeline stops and the notification action never executes.
Option B is polling: it averages 2.5 minutes of delay, costs a Lambda invocation and 30 API calls every five minutes forever, and has to track which failures were already reported.
Option C uses the wrong data at the wrong cadence. CloudTrail records API activity rather than pipeline state transitions, and a scheduled Athena query is a batch job measured in minutes, not seconds.
Reference: Monitoring CodePipeline events