0 votes
in AWS by

You've just deployed an AWS Lambda function.

This Lambda function would be invoked via the API gateway service.

You want to know if there were any errors while the Lambda function was being invoked.

Which of the following service would allow you to check the performance of your underlying Lambda function?

1 Answer

0 votes
by

Answer - B.

In AWS Lambda, you can use Cloudwatch metrics to see the number of Invocation errors.

The below snapshot from the AWS Documentation shows an example of this.

Accessing Amazon CloudWatch Metrics for AWS Lambda.

AWS Lambda automatically monitors functions on your behalf, reporting metrics through Amazon CloudWatch.

These metrics include total requests, latency, and error rates.

For more information about Lambda metrics, see AWS Lambda Metrics.

For more information about CloudWatch, see the Amazon CloudWatch User Guide.

You can monitor metrics for Lambda and view logs by using the Lambda console, the CloudWatch console, the AWS CLI, or the CloudWatch API.

The following procedures show you how to access metrics using these different methods.

To access metrics using the Lambda console.

Sign in to the AWS Management Console and open the AWS Lambda console at https://console.aws.amazon.com/lambda/.

On the Functions page, choose the function name and then choose the Monitoring tab.

Option A is invalid because this service is used to get the network traffic entering your VPC.Option C is invalid because this service is used to monitor API Activity.

Option D is invalid because this service does not have the ability to give you the metrics for the Lambda service.

For more information on accessing metrics for AWS Lambda, please refer to the below link-

https://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions-access-metrics.html

Accessing Amazon CloudWatch Metrics for AWS Lambda AWS Lambda automatically monitors functions on your behalf, reporting metrics through Amazon CloudWatch. These metrics include total reque: rates. For more information about Lambda metrics, see AWS Lambda Metrics. For more information about CloudWatch, see the Amazon CloudWe  You can monitor metrics for Lambda and view logs by using the Lambda console, the CloudWatch console, the AWS CLI, or the CloudWatch API. TI show you how to access metrics using these different methods.  To access metrics using the Lambda console 1. Sign in to the AWS Management Console and open the AWS Lambda console at https://console.aws.amazon.com/lambda/.  2. On the Functions page, choose the function name and then choose the Monitoring tab.  [Lamzeneasw] | lnveation dration Ge nnowee A, Invocation errs ate haw¥ damp tomes ametotog | | samptomecres ametotoge | | dumptometnes damp tage 0 a é ° ° ‘hy Mises

The correct answer is B. Cloudwatch.

When an AWS Lambda function is invoked via API Gateway, it is important to monitor the function's performance to ensure that it is running correctly and without any errors. AWS CloudWatch is a monitoring service that allows you to monitor and collect metrics, logs, and events from AWS resources, including AWS Lambda functions.

CloudWatch can be used to monitor metrics such as function invocation count, execution duration, and error rates. By monitoring these metrics, you can quickly identify any issues or bottlenecks in your Lambda function and take corrective action to ensure that it is running efficiently.

In addition to monitoring metrics, CloudWatch can also be used to monitor Lambda function logs. Lambda function logs are generated by the Lambda function and contain information about the function's execution, including any errors or exceptions that occurred during execution. By using CloudWatch Logs, you can centralize and analyze these logs, making it easier to identify and troubleshoot issues with your Lambda function.

Therefore, B. Cloudwatch is the correct answer as it is the AWS service that allows you to check the performance of your underlying Lambda function.

...