CfnEventSourceMappingProps

class aws_cdk.aws_lambda.CfnEventSourceMappingProps(*, function_name, amazon_managed_kafka_event_source_config=None, batch_size=None, bisect_batch_on_function_error=None, destination_config=None, document_db_event_source_config=None, enabled=None, event_source_arn=None, filter_criteria=None, function_response_types=None, kms_key_arn=None, maximum_batching_window_in_seconds=None, maximum_record_age_in_seconds=None, maximum_retry_attempts=None, metrics_config=None, parallelization_factor=None, provisioned_poller_config=None, queues=None, scaling_config=None, self_managed_event_source=None, self_managed_kafka_event_source_config=None, source_access_configurations=None, starting_position=None, starting_position_timestamp=None, tags=None, topics=None, tumbling_window_in_seconds=None)

Bases: object

Properties for defining a CfnEventSourceMapping.

Parameters:
  • function_name (str) – The name of the Lambda function.

  • amazon_managed_kafka_event_source_config (Union[IResolvable, AmazonManagedKafkaEventSourceConfigProperty, Dict[str, Any], None]) – Specific configuration settings for an MSK event source.

  • batch_size (Union[int, float, None]) – The maximum number of items to retrieve in a single batch.

  • bisect_batch_on_function_error (Union[bool, IResolvable, None]) – (Streams) If the function returns an error, split the batch in two and retry.

  • destination_config (Union[IResolvable, DestinationConfigProperty, Dict[str, Any], None]) – A configuration object that specifies the destination of an event after Lambda processes it.

  • document_db_event_source_config (Union[IResolvable, DocumentDBEventSourceConfigProperty, Dict[str, Any], None]) – Document db event source config.

  • enabled (Union[bool, IResolvable, None]) – Disables the event source mapping to pause polling and invocation.

  • event_source_arn (Optional[str]) – The Amazon Resource Name (ARN) of the event source.

  • filter_criteria (Union[IResolvable, FilterCriteriaProperty, Dict[str, Any], None]) – The filter criteria to control event filtering.

  • function_response_types (Optional[Sequence[str]]) – (Streams) A list of response types supported by the function.

  • kms_key_arn (Optional[str]) – The Amazon Resource Name (ARN) of the KMS key.

  • maximum_batching_window_in_seconds (Union[int, float, None]) – (Streams) The maximum amount of time to gather records before invoking the function, in seconds.

  • maximum_record_age_in_seconds (Union[int, float, None]) – (Streams) The maximum age of a record that Lambda sends to a function for processing.

  • maximum_retry_attempts (Union[int, float, None]) – (Streams) The maximum number of times to retry when the function returns an error.

  • metrics_config (Union[IResolvable, MetricsConfigProperty, Dict[str, Any], None]) – Metrics config for Event Source Mapping Metrics.

  • parallelization_factor (Union[int, float, None]) – (Streams) The number of batches to process from each shard concurrently.

  • provisioned_poller_config (Union[IResolvable, ProvisionedPollerConfigProperty, Dict[str, Any], None]) – ProvisionedPollerConfig.

  • queues (Optional[Sequence[str]]) – (ActiveMQ) A list of ActiveMQ queues.

  • scaling_config (Union[IResolvable, ScalingConfigProperty, Dict[str, Any], None]) – The scaling configuration for the event source.

  • self_managed_event_source (Union[IResolvable, SelfManagedEventSourceProperty, Dict[str, Any], None]) – The configuration used by AWS Lambda to access a self-managed event source.

  • self_managed_kafka_event_source_config (Union[IResolvable, SelfManagedKafkaEventSourceConfigProperty, Dict[str, Any], None]) – Specific configuration settings for a Self-Managed Apache Kafka event source.

  • source_access_configurations (Union[IResolvable, Sequence[Union[IResolvable, SourceAccessConfigurationProperty, Dict[str, Any]]], None]) – A list of SourceAccessConfiguration.

  • starting_position (Optional[str]) – The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Streams sources.

  • starting_position_timestamp (Union[int, float, None]) – With StartingPosition set to AT_TIMESTAMP, the time from which to start reading, in Unix time seconds.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – A list of tags to apply to event source mapping resource.

  • topics (Optional[Sequence[str]]) – (Kafka) A list of Kafka topics.

  • tumbling_window_in_seconds (Union[int, float, None]) – (Streams) Tumbling window (non-overlapping time window) duration to perform aggregations.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lambda as lambda_

cfn_event_source_mapping_props = lambda.CfnEventSourceMappingProps(
    function_name="functionName",

    # the properties below are optional
    amazon_managed_kafka_event_source_config=lambda.CfnEventSourceMapping.AmazonManagedKafkaEventSourceConfigProperty(
        consumer_group_id="consumerGroupId"
    ),
    batch_size=123,
    bisect_batch_on_function_error=False,
    destination_config=lambda.CfnEventSourceMapping.DestinationConfigProperty(
        on_failure=lambda.CfnEventSourceMapping.OnFailureProperty(
            destination="destination"
        )
    ),
    document_db_event_source_config=lambda.CfnEventSourceMapping.DocumentDBEventSourceConfigProperty(
        collection_name="collectionName",
        database_name="databaseName",
        full_document="fullDocument"
    ),
    enabled=False,
    event_source_arn="eventSourceArn",
    filter_criteria=lambda.CfnEventSourceMapping.FilterCriteriaProperty(
        filters=[lambda.CfnEventSourceMapping.FilterProperty(
            pattern="pattern"
        )]
    ),
    function_response_types=["functionResponseTypes"],
    kms_key_arn="kmsKeyArn",
    maximum_batching_window_in_seconds=123,
    maximum_record_age_in_seconds=123,
    maximum_retry_attempts=123,
    metrics_config=lambda.CfnEventSourceMapping.MetricsConfigProperty(
        metrics=["metrics"]
    ),
    parallelization_factor=123,
    provisioned_poller_config=lambda.CfnEventSourceMapping.ProvisionedPollerConfigProperty(
        maximum_pollers=123,
        minimum_pollers=123
    ),
    queues=["queues"],
    scaling_config=lambda.CfnEventSourceMapping.ScalingConfigProperty(
        maximum_concurrency=123
    ),
    self_managed_event_source=lambda.CfnEventSourceMapping.SelfManagedEventSourceProperty(
        endpoints=lambda.CfnEventSourceMapping.EndpointsProperty(
            kafka_bootstrap_servers=["kafkaBootstrapServers"]
        )
    ),
    self_managed_kafka_event_source_config=lambda.CfnEventSourceMapping.SelfManagedKafkaEventSourceConfigProperty(
        consumer_group_id="consumerGroupId"
    ),
    source_access_configurations=[lambda.CfnEventSourceMapping.SourceAccessConfigurationProperty(
        type="type",
        uri="uri"
    )],
    starting_position="startingPosition",
    starting_position_timestamp=123,
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    topics=["topics"],
    tumbling_window_in_seconds=123
)

Attributes

amazon_managed_kafka_event_source_config

Specific configuration settings for an MSK event source.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig

batch_size

The maximum number of items to retrieve in a single batch.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-batchsize

bisect_batch_on_function_error

(Streams) If the function returns an error, split the batch in two and retry.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-bisectbatchonfunctionerror

destination_config

A configuration object that specifies the destination of an event after Lambda processes it.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-destinationconfig

document_db_event_source_config

Document db event source config.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig

enabled

Disables the event source mapping to pause polling and invocation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-enabled

event_source_arn

The Amazon Resource Name (ARN) of the event source.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-eventsourcearn

filter_criteria

The filter criteria to control event filtering.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-filtercriteria

function_name

The name of the Lambda function.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-functionname

function_response_types

(Streams) A list of response types supported by the function.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-functionresponsetypes

kms_key_arn

The Amazon Resource Name (ARN) of the KMS key.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-kmskeyarn

maximum_batching_window_in_seconds

(Streams) The maximum amount of time to gather records before invoking the function, in seconds.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-maximumbatchingwindowinseconds

maximum_record_age_in_seconds

(Streams) The maximum age of a record that Lambda sends to a function for processing.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-maximumrecordageinseconds

maximum_retry_attempts

(Streams) The maximum number of times to retry when the function returns an error.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-maximumretryattempts

metrics_config

Metrics config for Event Source Mapping Metrics.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-metricsconfig

parallelization_factor

(Streams) The number of batches to process from each shard concurrently.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-parallelizationfactor

provisioned_poller_config

ProvisionedPollerConfig.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-provisionedpollerconfig

queues

(ActiveMQ) A list of ActiveMQ queues.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-queues

scaling_config

The scaling configuration for the event source.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-scalingconfig

self_managed_event_source

The configuration used by AWS Lambda to access a self-managed event source.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-selfmanagedeventsource

self_managed_kafka_event_source_config

Specific configuration settings for a Self-Managed Apache Kafka event source.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig

source_access_configurations

A list of SourceAccessConfiguration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-sourceaccessconfigurations

starting_position

The position in a stream from which to start reading.

Required for Amazon Kinesis and Amazon DynamoDB Streams sources.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-startingposition

starting_position_timestamp

With StartingPosition set to AT_TIMESTAMP, the time from which to start reading, in Unix time seconds.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-startingpositiontimestamp

tags

A list of tags to apply to event source mapping resource.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-tags

topics

(Kafka) A list of Kafka topics.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-topics

tumbling_window_in_seconds

(Streams) Tumbling window (non-overlapping time window) duration to perform aggregations.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-tumblingwindowinseconds