AWS Certified Developer – Associate (DVA-C02) — Question 253

A company has a web application that is hosted on Amazon EC2 instances. The EC2 instances are configured to stream logs to Amazon CloudWatch Logs. The company needs to receive an Amazon Simple Notification Service (Amazon SNS) notification when the number of application error messages exceeds a defined threshold within a 5-minute period.

Which solution will meet these requirements?

Answer options

Correct answer: D

Explanation

Option D is correct because it utilizes a CloudWatch metric filter to track application errors and triggers an alarm that can send an SNS notification when the defined threshold is exceeded. Option A is incorrect as it requires rewriting application code, which is unnecessary. Option B does not directly create a metric to monitor error counts, and option C involves using Amazon Inspector, which is not suitable for tracking log errors in the described context.