Question 475:
<span dir="LTR">You have deployed a Java application in an AWS Auto Scaling group. The application has sent its logs to an AWS CloudWatch Log Group. You want to deliver the log events from the CloudWatch Log Group to a Lambda function in real-time for custom processing and analysis. As the Lambda function is designed to process only the logs that contain certain keywords, you need a filter pattern that defines which log events should be forwarded. How would you implement this?</span>
Answer options:
A.In the CloudWatch Log Group, create a metric filter to send the log data to the AWS Lambda function. Set up a filter pattern in the metric filter to specify which logs are forwarded. B.In the CloudWatch Log Group, create a subscription filter that sends the log data to the AWS Lambda function. Set up the filter pattern in the subscription filter to specify which logs are forwarded. C.Select the log stream of the CloudWatch Log Group and click “Export results”. Choose the Lambda function and configure the filter pattern. D.Select the CloudWatch Log Group and click “Export data to Lambda”. Choose your Lambda function and define the filter pattern.