A developer is troubleshooting an AWS Lambda function that occasionally fails. The developer wants to monitor these failures by creating a CloudWatch metric and alarm whenever the function times out. The Lambda function has a timeout configured for 15 seconds. The log stream contains the following log event:
`2026-07-14T12:00:00.000Z 8f029cfa-13e5-4b4f-8f81-540e7912a78f Task timed out after 15.02 seconds`
The developer configures a metric filter with the filter pattern `[timestamp, request_id, message = "Task timed out*"]` to increment a custom metric named `TimeoutCount`. However, the metric remains at 0 even after subsequent timeouts occur.
Which of the following actions should the developer take to resolve this issue and successfully track the timeouts? (Select TWO.)
- Update the metric filter pattern to "Task timed out" (with double quotes) to match the exact phrase anywhere in the log event.Answer
- Update the metric filter pattern to [timestamp, request_id, word1 = "Task", word2 = "timed", word3 = "out"] to correctly match the individual space-delimited words in the log entry.Answer
- CGrant cloudwatch:PutMetricData permissions to the Lambda function's IAM execution role so the function can publish the metric.
- DIncrease the Lambda function's timeout configuration to 15 minutes to allow the metric filter enough time to process and publish the custom metric.
- EUpdate the metric filter pattern to [timestamp, request_id, message = "*Task timed out*"] to enable wildcard matching for the message field.