CertKeen

AWS Developer Associate (DVA-C03) · Free practice question 12 of 12

Metric filters for log-based alarms

A legacy application at Bramhall Utilities writes the text PAYMENT_GATEWAY_DOWN to CloudWatch Logs when it cannot reach its payment provider. The team cannot change the code but wants an alarm when this text appears more than 5 times in 5 minutes. What should they configure?

  1. A.A metric filter that matches the text and publishes a metric, plus an alarm on that metric
  2. B.A CloudWatch Synthetics canary that reads the log group and emails the team when it finds the text
  3. C.An X-Ray sampling rule that samples every request containing the text in its log output
  4. D.A log group retention policy of 5 minutes that triggers an alarm when entries are deleted
Show answer and explanation

Correct answer: A. A metric filter that matches the text and publishes a metric, plus an alarm on that metric

Why: Metric filters turn matching log events into CloudWatch metric data points, and an alarm on the metric can notify when the count exceeds a threshold over a period. Canaries test endpoints and user flows, not log contents. X-Ray sampling rules control which requests are traced and do not read log text. Retention settings delete old logs and do not raise alarms.

More free AWS Developer Associate (DVA-C03) questions