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?
- A.A metric filter that matches the text and publishes a metric, plus an alarm on that metric
- B.A CloudWatch Synthetics canary that reads the log group and emails the team when it finds the text
- C.An X-Ray sampling rule that samples every request containing the text in its log output
- 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
- Step Functions Retry and Catch fields
- SQS FIFO message groups for ordering
- DynamoDB Streams for change processing
- EventBridge Scheduler one-time invocations
- Explicit deny in policy evaluation
- Hardening S3 bucket access settings
- ApplyGuardrail API for any model
- Previewing stack updates with change sets
- Test traffic hook in ECS blue/green
- API Gateway REST canary release
- SQS visibility timeout for Lambda consumers