A developer is troubleshooting an AWS Lambda function that occasionally terminates abruptly. To measure the frequency of these occurrences, the developer wants to create an Amazon CloudWatch metric that increments every time a function execution times out. The Lambda log group contains standard timeout log entries, such as:
`2026-07-14T12:00:00.000Z 88888888-4444-4444-4444-121212121212 Task timed out after 10.03 seconds`
Which log metric filter pattern must the developer configure on the log group to accurately capture only these timeout events?
- A$.message = "Task timed out"
- "Task timed out"Cevap
- C[date, timestamp, message = "*Task timed out*"]
- DIncrease the Lambda function's timeout configuration to minutes
Cevap
"Task timed out"
The correct answer is the option specifying the exact phrase in double quotes. In Amazon CloudWatch Logs, filter patterns for unstructured plain text logs can match an exact phrase by enclosing the phrase in double quotes. Since the standard Lambda timeout message contains the phrase "Task timed out", this pattern will match the line and increment the metric.
Adım Adım Çözüm
Anahtar Kavram
CloudWatch Metric Filter syntax for unstructured text logs
Tahmini Süre:45s