AWS Lambda monitors functions and sends metrics to Amazon CloudWatch. These
metrics include total invocations, errors, duration, throttles, dead-letter
queue errors, and iterator age for stream-based invocations.

[float]
=== AWS Permissions
Some specific AWS permissions are required for IAM user to collect AWS EBS metrics.
----
ec2:DescribeRegions
cloudwatch:GetMetricData
cloudwatch:ListMetrics
tag:getResources
sts:GetCallerIdentity
iam:ListAccountAliases
----

[float]
=== Dashboard

The aws lambda metricset comes with a predefined dashboard. For example:

image::./images/metricbeat-aws-lambda-overview.png[]

[float]
=== Configuration example
[source,yaml]
----
- module: aws
  period: 300s
  metricsets:
    - lambda
  # This module uses the aws cloudwatch metricset, all
  # the options for this metricset are also available here.
----

[float]
=== Metrics
Please see more details for each metric in
https://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions-metrics.html[lambda-cloudwatch-metric].

|===
|Metric Name|Statistic Method
|Invocations | Average
|Errors | Average
|DeadLetterErrors | Average
|DestinationDeliveryFailures | Average
|Duration | Average
|Throttles | Average
|IteratorAge | Average
|ConcurrentExecutions | Average
|UnreservedConcurrentExecutions | Average
|ProvisionedConcurrentExecutions | Maximum
|ProvisionedConcurrencyInvocations | Sum
|ProvisionedConcurrencySpilloverInvocations | Sum
|ProvisionedConcurrencyUtilization | Maximum
|===
