AWS Certified Developer – Associate — Question 125
An application on AWS is using third-party APIs. A developer needs to monitor API errors in the code. The developer needs to receive notifications if failures reach a set threshold value.
How can the developer meet these requirements?
Answer options
- A. Publish a custom metric to Amazon CloudWatch. Create a metric alarm. Use Amazon Simple Email Service (Amazon SES) for notification.
- B. Use an Amazon CloudWatch API error metric. Use Amazon Simple Notification Service (Amazon SNS) for notification.
- C. Use an Amazon CloudWatch API error metric. Use Amazon Simple Email Service (Amazon SES) for notification.
- D. Publish a custom metric to Amazon CloudWatch. Create a metric alarm. Use Amazon Simple Notification Service (Amazon SNS) for notification.
Correct answer: D
Explanation
The correct answer is D because it specifies the use of a custom metric and a metric alarm, which are essential for monitoring and triggering notifications based on thresholds. While option A also mentions a custom metric and alarm, it incorrectly uses Amazon SES instead of SNS for notifications, which is more suited for alerting in this context. Options B and C do not involve custom metrics or alarms, making them unsuitable for the specified requirements.