An application deployed on Amazon EC2 instances streams its log files to an Amazon CloudWatch Logs log group named `/aws/ec2/app-logs` using the Unified CloudWatch Agent. The application logs are structured as JSON objects, with the following format:
{
"timestamp": "2026-07-14T10:00:00Z",
"status": "FAIL",
"errorCode": 401,
"latency_ms": 150
}
A developer needs to configure a CloudWatch metric filter to track the number of failed login attempts where the `status` is `"FAIL"` and the `errorCode` is `401`. Additionally, the developer needs to run a CloudWatch Logs Insights query to find the 90th percentile of `latency_ms` for these specific failed login events, grouped into 15-minute intervals over the last 24 hours.
Which two options should the developer use to accomplish these tasks? (Select TWO.)
- A CloudWatch metric filter with the pattern `{ .status = "FAIL" && .errorCode = 401 }` to track the occurrences of failed loginsCevap
- BA CloudWatch metric filter with the pattern `[status = "FAIL", errorCode = 401]` to track the occurrences of failed logins
- A CloudWatch Logs Insights query:
fields @timestamp, latency_ms
| filter status = "FAIL" and errorCode = 401
| stats pct(latency_ms, 90) by bin(15m)
Cevap - DA CloudWatch Logs Insights query:
fields @timestamp, latency_ms
| filter status == "FAIL" and errorCode == 401
| stats percentile(latency_ms, 90) group by 15m - EA CloudWatch metric filter with the pattern `{ status: "FAIL", errorCode: 401 }` to track the occurrences of failed logins