A metric is a time-ordered set of data points that is published to CloudWatch. A metric can be considered as a variable to monitor and the data points represent the values of that variable over a given time. The default metrics available for AWS Lambda functions include Invocations, Errors, DeadLetterErrors, Duration, Throttles, IteratorAge, ConcurrentExecutions, and UnreservedConcurrentExecutions.
Metrics are defined by a name, a namespace, and zero or more dimensions. For example, for the metric Invocations that we saw in this recipe, the namespace is AWS/Lambda. The dimensions are name–value pairs that can be associated with a CloudWatch metric. We can specify up to 10 dimensions for a given metric. The dimensions available for AWS Lambda CloudWatch include FunctionName, Resource, and ExecutedVersion.