Q17 — AWS DOP-C02 Ch.2
Question 17 of 100 | ← Chapter 2
A company wants to reduce the lead time required to develop new features. The company uses AWS CodeBuild and AWS CodeDeploy to build and deploy its application. The company uses AWS CodePipeline to deploy each microservice and maintain its own CI/CD pipelines. The company needs greater visibility into the average lead time from releasing a new feature to recovering after a deployment failure.
- A. Schedule an AWS Lambda function that creates Amazon CloudWatch custom metrics containing information about each pipeline’s successful and failed runs. Create an Amazon EventBridge rule every 5 minutes to invoke the Lambda function. Build a CloudWatch dashboard using the metrics.
- B. Schedule an AWS Lambda function that creates Amazon CloudWatch custom metrics containing information about each pipeline’s successful and failed runs. Create an Amazon EventBridge rule to invoke the Lambda function after each successful run and each failed run. Build a CloudWatch dashboard using the metrics. ✓
- C. Program an AWS Lambda function that writes information about successful and failed runs to Amazon DynamoDB. Create an Amazon EventBridge rule to invoke the Lambda function after each successful run and each failed run. Build an Amazon QuickSight dashboard displaying information from DynamoDB.
- D. Develop an AWS Lambda function that writes information about successful and failed runs to Amazon DynamoDB. Create an Amazon EventBridge rule every 5 minutes to invoke the Lambda function. Build an Amazon QuickSight dashboard displaying information from DynamoDB.
Correct Answer: B. Schedule an AWS Lambda function that creates Amazon CloudWatch custom metrics containing information about each pipeline’s successful and failed runs. Create an Amazon EventBridge rule to invoke the Lambda function after each successful run and each failed run. Build a CloudWatch dashboard using the metrics.
Explanation
In AWS service integration, using an EventBridge rule triggered after each successful or failed pipeline run enables real-time capture of CI/CD state changes. The Lambda function then writes this information to CloudWatch custom metrics, enabling immediate dashboard visualization. This event-driven approach eliminates polling, reduces latency and resource consumption, and ensures metric accuracy. Other options rely on scheduled tasks or introduce unnecessary services (e.g., DynamoDB, QuickSight), increasing complexity and configuration effort. AWS documentation recommends event-driven patterns over periodic polling for real-time monitoring. Option B aligns with this best practice and offers minimal configuration overhead.