Q39 — AWS DOP-C02 Ch.3
Question 39 of 100 | ← Chapter 3
A DevOps engineer is using AWS CodePipeline to build a multi-stage pipeline for building, validating, staging, testing, and deploying applications. A manual approval stage is required between the test and deploy stages. The development team uses a chat tool with webhook support that requires near real-time notifications. How should the DevOps engineer configure channels to deliver pipeline activity and approval request status updates to the chat tool?
- A. Create an Amazon CloudWatch Logs subscription to filter changes in CodePipeline execution status. Publish subscription events to an Amazon Simple Notification Service (Amazon SNS) topic. Subscribe the chat webhook URL to the SNS topic and complete subscription verification.
- B. Create an AWS Lambda function invoked by AWS CloudTrail events. When a CodePipeline pipeline execution status change event is detected, send event details to the chat webhook URL.
- C. Create an Amazon EventBridge rule to filter CodePipeline execution status changes. Publish events to an Amazon Simple Notification Service (Amazon SNS) topic. Create an AWS Lambda function that sends event details to the chat webhook URL. Subscribe the Lambda function to the SNS topic. ✓
- D. Modify the pipeline code to send event details to the chat webhook URL at the end of each stage. Parameterize the URL so each pipeline can send to different URLs based on pipeline environment.
Correct Answer: C. Create an Amazon EventBridge rule to filter CodePipeline execution status changes. Publish events to an Amazon Simple Notification Service (Amazon SNS) topic. Create an AWS Lambda function that sends event details to the chat webhook URL. Subscribe the Lambda function to the SNS topic.
Explanation
Amazon EventBridge rules monitor AWS service events, such as CodePipeline execution status changes. Upon detection, events are routed to an Amazon SNS topic. A Lambda function subscribes to that topic, processes event data, and invokes the chat tool’s webhook URL. Option C correctly combines EventBridge, SNS, and Lambda to implement a real-time notification flow. Option A relies on log subscriptions, potentially introducing latency; Option B uses CloudTrail event tracking, which is less direct than EventBridge; Option D modifies pipeline code, increasing maintenance overhead.