Which action will meet this requirement in the MOST operationally efficient manner?

An AWS Lambda function is intermittently failing several times a day A SysOps administrator must find out how often this error has occurred in the last 7 days.

Which action will meet this requirement in the MOST operationally efficient manner?
A . Use Amazon Athena to query the Amazon CloudWatch logs that are associated with the Lambda function
B . Use Amazon Athena to query the AWS CloudTrail logs that are associated with the Lambda function
C . Use Amazon CloudWatch Logs Insights to query the associated Lambda function logs
D . Use Amazon Elasticsearch Service (Amazon ES) to stream the Amazon CloudWatch logs for the Lambda function

Answer: C

Explanation:

To efficiently find out how often the AWS Lambda function has failed in the last 7 days, use Amazon CloudWatch Logs Insights.

Access CloudWatch Logs Insights:

Navigate to the CloudWatch console.

Select "Logs Insights" from the navigation pane.

Reference: Analyzing Log Data with CloudWatch Logs Insights

Select the Log Group:

Select the log group associated with the Lambda function. Specify the time range for the last 7 days. Run the Query:

Use a query to filter and count the occurrences of errors in the logs. For example:

sql

Copy code

fields @timestamp, @message

| filter @message like /ERROR/

| stats count() by bin(1d)

This query will count the number of errors per day in the last 7 days.

Using CloudWatch Logs Insights provides an efficient way to query and analyze log data, helping you quickly identify the frequency of Lambda function failures.

Latest SOA-C02 Dumps Valid Version with 54 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments