QuestionQ44

VerifiedDevelopment with AWS Services

A company deploys a new application to AWS. The company is streaming application logs to Amazon CloudWatch Logs. The company's development team must receive notification by email when the word "ERROR" appears in any log lines. A developer sets up an Amazon Simple Notification Service (Amazon SNS) topic and subscribes the development team to the topic.

What should the developer do next to meet the requirements?

Explanation

A CloudWatch metric filter scans log lines for a pattern ("ERROR") and increments a custom metric when matches occur. A CloudWatch alarm on this metric triggers the SNS notification when the metric threshold is exceeded. This is the standard pattern for log-based alerting in CloudWatch. CloudWatch Logs Insights (B) is for ad-hoc queries, not continuous alerting; SNS subscription filters (C) do not exist for CloudWatch Logs; CloudWatch alarms (D) cannot directly consume filter patterns.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!