Menu
Amazon CloudWatch
User Guide

AWS Lambda Metrics and Dimensions

AWS Lambda sends metrics to CloudWatch every minute. For more information, see Troubleshooting and Monitoring AWS Lambda Functions with Amazon CloudWatch in the AWS Lambda Developer Guide.

AWS Lambda CloudWatch Metrics

The AWS/Lambda namespace includes the following metrics.

MetricDescription
Invocations

Measures the number of times a function is invoked in response to an event or invocation API call. This replaces the deprecated RequestCount metric. This includes successful and failed invocations, but does not include throttled attempts. This equals the billed requests for the function. Note that AWS Lambda only sends these metrics to CloudWatch if they have a nonzero value.

Units: Count

Errors

Measures the number of invocations that failed due to errors in the function (response code 4XX). This replaces the deprecated ErrorCount metric. Failed invocations may trigger a retry attempt that succeeds. This includes:

  • Handled exceptions (e.g., context.fail(error))

  • Unhandled exceptions causing the code to exit

  • Out of memory exceptions

  • Timeouts

  • Permissions errors

This does not include invocations that fail due to invocation rates exceeding default concurrent limits (error code 429) or failures due to internal service errors (error code 500).

Units: Count

Duration

Measures the elapsed wall clock time from when the function code starts executing as a result of an invocation to when it stops executing. This replaces the deprecated Latency metric. The maximum data point value possible is the function timeout configuration. The billed duration will be rounded up to the nearest 100 millisecond. Note that AWS Lambda only sends these metrics to CloudWatch if they have a nonzero value.

Units: Milliseconds

Throttles

Measures the number of Lambda function invocation attempts that were throttled due to invocation rates exceeding the customer’s concurrent limits (error code 429). Failed invocations may trigger a retry attempt that succeeds.

Units: Count

Errors/Invocations Ratio

When calculating the error rate on Lambda function invocations, it’s important to distinguish between an invocation request and an actual invocation. It is possible for the error rate to exceed the number of billed Lambda function invocations. Lambda reports an invocation metric only if the Lambda function code is executed. If the invocation request yields a throttling or other initialization error that prevents the Lambda function code from being invoked, Lambda will report an error, but it does not log an invocation metric.

  • Lambda emits Invocations=1 when the function is executed. If the Lambda function is not executed, nothing is emitted.

  • Lambda emits a data point for Errors for each invoke request. Errors=0 means that there is no function execution error. Errors=1 means that there is a function execution error.

  • Lambda emits a data point for Throttles for each invoke request. Throttles=0 means there is no invocation throttle. Throttles=1 means there is an invocation throttle.

Dimensions for AWS Lambda Metrics

Lambda data can be filtered along any of the following dimensions in the table below.

AWS Lambda CloudWatch Dimensions

You can use the dimensions in the following table to refine the metrics returned for your Lambda functions.

DimensionDescription
FunctionName

Filters the metric data by Lambda function.

Resource

Filters the metric data by Lambda function resource.

Version

Filters the metric data by Lambda version.

Alias

Filters the metric data by Lambda alias.