MetricType

class aws_cdk.aws_lambda.MetricType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

ExampleMetadata:

infused

Example:

import aws_cdk.aws_lambda_event_sources as eventsources
import aws_cdk.aws_dynamodb as dynamodb

# fn: lambda.Function

table = dynamodb.Table(self, "Table",
    partition_key=dynamodb.Attribute(
        name="id",
        type=dynamodb.AttributeType.STRING
    ),
    stream=dynamodb.StreamViewType.NEW_IMAGE
)

fn.add_event_source(eventsources.DynamoEventSource(table,
    starting_position=lambda_.StartingPosition.LATEST,
    metrics_config=lambda.MetricsConfig(
        metrics=[lambda_.MetricType.EVENT_COUNT]
    )
))

Attributes

EVENT_COUNT

Event Count metrics provide insights into the processing behavior of your event source mapping, including the number of events successfully processed, filtered out, or dropped.

These metrics help you monitor the flow and status of events through your event source mapping.