Menu
Amazon CloudFront
Developer Guide (API Version 2016-09-29)

CloudWatch Metrics and CloudWatch Logs for Lambda Functions

You can use CloudWatch metrics to monitor, in real time, the CloudFront requests that trigger Lambda functions. You can also use CloudWatch Logs to get aggregate data. There's no additional charge for metrics or logs.

CloudWatch Metrics

When you create a trigger for a CloudFront event, Lambda automatically begins to send metrics to CloudWatch. Metrics are available for all Lambda regions. The name of each metric is /aws/lambda/us-east-1.function-name where function-name is the name that you gave to the function when you created it.

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

CloudWatch Logs

When you create a trigger, Lambda automatically starts to send data to CloudWatch Logs about the CloudFront requests that trigger Lambda functions. You use CloudWatch Logs tools to access the query logs.

Lambda creates one CloudWatch Logs log stream for each CloudWatch Logs region that a function executes in and sends logs to the applicable log stream. The format of the name for each log stream is /aws/lambda/us-east-1.function-name where function-name is the name that you gave to the function when you created it.

For information about the permissions required to send data to CloudWatch Logs, see Setting IAM Permissions and Roles for Lambda@Edge in the IAM User Guide.

For information about adding logging to a Lambda function, see Logging (Node.js) in the AWS Lambda Developer Guide.

For information about CloudWatch Logs limits, see CloudWatch Logs Limits in the Amazon CloudWatch Logs User Guide.

Lambda@Edge throttles logs based on the request volume and the size of logs.