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/.
If you have not created a Lambda function before, see Getting Started.
On the Functions page, choose the function name and then choose the Monitoring tab.
A graphical representation of the metrics for the Lambda function are shown.
Choose View logs in CloudWatch to view the logs.
To access metrics using the CloudWatch console
Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/.
From the navigation bar, choose a region.
In the navigation pane, choose Metrics.
In the CloudWatch Metrics by Category pane, choose Lambda Metrics.
(Optional) In the graph pane, choose a statistic and a time period, and then create a CloudWatch alarm using these settings.
To access metrics using the AWS CLI
To access metrics using the CloudWatch CLI
To access metrics using the CloudWatch API