CfnEventSourceMappingPropsMixin

class aws_cdk.mixins_preview.aws_lambda.mixins.CfnEventSourceMappingPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::Lambda::EventSourceMapping resource creates a mapping between an event source and an AWS Lambda function.

Lambda reads items from the event source and triggers the function.

For details about each event source type, see the following topics. In particular, each of the topics describes the required and optional parameters for the specific event source.

See:

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

CloudformationResource:

AWS::Lambda::EventSourceMapping

Mixin:

true

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.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_lambda import mixins as lambda_mixins

cfn_event_source_mapping_props_mixin = lambda_mixins.CfnEventSourceMappingPropsMixin(lambda_mixins.CfnEventSourceMappingMixinProps(
    amazon_managed_kafka_event_source_config=lambda_mixins.CfnEventSourceMappingPropsMixin.AmazonManagedKafkaEventSourceConfigProperty(
        consumer_group_id="consumerGroupId",
        schema_registry_config=lambda_mixins.CfnEventSourceMappingPropsMixin.SchemaRegistryConfigProperty(
            access_configs=[lambda_mixins.CfnEventSourceMappingPropsMixin.SchemaRegistryAccessConfigProperty(
                type="type",
                uri="uri"
            )],
            event_record_format="eventRecordFormat",
            schema_registry_uri="schemaRegistryUri",
            schema_validation_configs=[lambda_mixins.CfnEventSourceMappingPropsMixin.SchemaValidationConfigProperty(
                attribute="attribute"
            )]
        )
    ),
    batch_size=123,
    bisect_batch_on_function_error=False,
    destination_config=lambda_mixins.CfnEventSourceMappingPropsMixin.DestinationConfigProperty(
        on_failure=lambda_mixins.CfnEventSourceMappingPropsMixin.OnFailureProperty(
            destination="destination"
        )
    ),
    document_db_event_source_config=lambda_mixins.CfnEventSourceMappingPropsMixin.DocumentDBEventSourceConfigProperty(
        collection_name="collectionName",
        database_name="databaseName",
        full_document="fullDocument"
    ),
    enabled=False,
    event_source_arn="eventSourceArn",
    filter_criteria=lambda_mixins.CfnEventSourceMappingPropsMixin.FilterCriteriaProperty(
        filters=[lambda_mixins.CfnEventSourceMappingPropsMixin.FilterProperty(
            pattern="pattern"
        )]
    ),
    function_name="functionName",
    function_response_types=["functionResponseTypes"],
    kms_key_arn="kmsKeyArn",
    logging_config=lambda_mixins.CfnEventSourceMappingPropsMixin.LoggingConfigProperty(
        system_log_level="systemLogLevel"
    ),
    maximum_batching_window_in_seconds=123,
    maximum_record_age_in_seconds=123,
    maximum_retry_attempts=123,
    metrics_config=lambda_mixins.CfnEventSourceMappingPropsMixin.MetricsConfigProperty(
        metrics=["metrics"]
    ),
    parallelization_factor=123,
    provisioned_poller_config=lambda_mixins.CfnEventSourceMappingPropsMixin.ProvisionedPollerConfigProperty(
        maximum_pollers=123,
        minimum_pollers=123,
        poller_group_name="pollerGroupName"
    ),
    queues=["queues"],
    scaling_config=lambda_mixins.CfnEventSourceMappingPropsMixin.ScalingConfigProperty(
        maximum_concurrency=123
    ),
    self_managed_event_source=lambda_mixins.CfnEventSourceMappingPropsMixin.SelfManagedEventSourceProperty(
        endpoints=lambda_mixins.CfnEventSourceMappingPropsMixin.EndpointsProperty(
            kafka_bootstrap_servers=["kafkaBootstrapServers"]
        )
    ),
    self_managed_kafka_event_source_config=lambda_mixins.CfnEventSourceMappingPropsMixin.SelfManagedKafkaEventSourceConfigProperty(
        consumer_group_id="consumerGroupId",
        schema_registry_config=lambda_mixins.CfnEventSourceMappingPropsMixin.SchemaRegistryConfigProperty(
            access_configs=[lambda_mixins.CfnEventSourceMappingPropsMixin.SchemaRegistryAccessConfigProperty(
                type="type",
                uri="uri"
            )],
            event_record_format="eventRecordFormat",
            schema_registry_uri="schemaRegistryUri",
            schema_validation_configs=[lambda_mixins.CfnEventSourceMappingPropsMixin.SchemaValidationConfigProperty(
                attribute="attribute"
            )]
        )
    ),
    source_access_configurations=[lambda_mixins.CfnEventSourceMappingPropsMixin.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
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Lambda::EventSourceMapping.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['amazonManagedKafkaEventSourceConfig', 'batchSize', 'bisectBatchOnFunctionError', 'destinationConfig', 'documentDbEventSourceConfig', 'enabled', 'eventSourceArn', 'filterCriteria', 'functionName', 'functionResponseTypes', 'kmsKeyArn', 'loggingConfig', 'maximumBatchingWindowInSeconds', 'maximumRecordAgeInSeconds', 'maximumRetryAttempts', 'metricsConfig', 'parallelizationFactor', 'provisionedPollerConfig', 'queues', 'scalingConfig', 'selfManagedEventSource', 'selfManagedKafkaEventSourceConfig', 'sourceAccessConfigurations', 'startingPosition', 'startingPositionTimestamp', 'tags', 'topics', 'tumblingWindowInSeconds']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

AmazonManagedKafkaEventSourceConfigProperty

class CfnEventSourceMappingPropsMixin.AmazonManagedKafkaEventSourceConfigProperty(*, consumer_group_id=None, schema_registry_config=None)

Bases: object

Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.

Parameters:
  • consumer_group_id (Optional[str]) – The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see Customizable consumer group ID .

  • schema_registry_config (Union[IResolvable, SchemaRegistryConfigProperty, Dict[str, Any], None]) – Specific configuration settings for a Kafka schema registry.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig.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.mixins_preview.aws_lambda import mixins as lambda_mixins

amazon_managed_kafka_event_source_config_property = lambda_mixins.CfnEventSourceMappingPropsMixin.AmazonManagedKafkaEventSourceConfigProperty(
    consumer_group_id="consumerGroupId",
    schema_registry_config=lambda_mixins.CfnEventSourceMappingPropsMixin.SchemaRegistryConfigProperty(
        access_configs=[lambda_mixins.CfnEventSourceMappingPropsMixin.SchemaRegistryAccessConfigProperty(
            type="type",
            uri="uri"
        )],
        event_record_format="eventRecordFormat",
        schema_registry_uri="schemaRegistryUri",
        schema_validation_configs=[lambda_mixins.CfnEventSourceMappingPropsMixin.SchemaValidationConfigProperty(
            attribute="attribute"
        )]
    )
)

Attributes

consumer_group_id

The identifier for the Kafka consumer group to join.

The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see Customizable consumer group ID .

See:

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

schema_registry_config

Specific configuration settings for a Kafka schema registry.

See:

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

DestinationConfigProperty

class CfnEventSourceMappingPropsMixin.DestinationConfigProperty(*, on_failure=None)

Bases: object

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

For more information, see Adding a destination .

Parameters:

on_failure (Union[IResolvable, OnFailureProperty, Dict[str, Any], None]) – The destination configuration for failed invocations.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-destinationconfig.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.mixins_preview.aws_lambda import mixins as lambda_mixins

destination_config_property = lambda_mixins.CfnEventSourceMappingPropsMixin.DestinationConfigProperty(
    on_failure=lambda_mixins.CfnEventSourceMappingPropsMixin.OnFailureProperty(
        destination="destination"
    )
)

Attributes

on_failure

The destination configuration for failed invocations.

See:

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

DocumentDBEventSourceConfigProperty

class CfnEventSourceMappingPropsMixin.DocumentDBEventSourceConfigProperty(*, collection_name=None, database_name=None, full_document=None)

Bases: object

Specific configuration settings for a DocumentDB event source.

Parameters:
  • collection_name (Optional[str]) – The name of the collection to consume within the database. If you do not specify a collection, Lambda consumes all collections.

  • database_name (Optional[str]) – The name of the database to consume within the DocumentDB cluster.

  • full_document (Optional[str]) – Determines what DocumentDB sends to your event stream during document update operations. If set to UpdateLookup, DocumentDB sends a delta describing the changes, along with a copy of the entire document. Otherwise, DocumentDB sends only a partial document that contains the changes.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig.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.mixins_preview.aws_lambda import mixins as lambda_mixins

document_dBEvent_source_config_property = lambda_mixins.CfnEventSourceMappingPropsMixin.DocumentDBEventSourceConfigProperty(
    collection_name="collectionName",
    database_name="databaseName",
    full_document="fullDocument"
)

Attributes

collection_name

The name of the collection to consume within the database.

If you do not specify a collection, Lambda consumes all collections.

See:

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

database_name

The name of the database to consume within the DocumentDB cluster.

See:

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

full_document

Determines what DocumentDB sends to your event stream during document update operations.

If set to UpdateLookup, DocumentDB sends a delta describing the changes, along with a copy of the entire document. Otherwise, DocumentDB sends only a partial document that contains the changes.

See:

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

EndpointsProperty

class CfnEventSourceMappingPropsMixin.EndpointsProperty(*, kafka_bootstrap_servers=None)

Bases: object

The list of bootstrap servers for your Kafka brokers in the following format: "KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"] .

Parameters:

kafka_bootstrap_servers (Optional[Sequence[str]]) – The list of bootstrap servers for your Kafka brokers in the following format: "KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"] .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-endpoints.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.mixins_preview.aws_lambda import mixins as lambda_mixins

endpoints_property = lambda_mixins.CfnEventSourceMappingPropsMixin.EndpointsProperty(
    kafka_bootstrap_servers=["kafkaBootstrapServers"]
)

Attributes

kafka_bootstrap_servers

"KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"] .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-endpoints.html#cfn-lambda-eventsourcemapping-endpoints-kafkabootstrapservers

Type:

The list of bootstrap servers for your Kafka brokers in the following format

FilterCriteriaProperty

class CfnEventSourceMappingPropsMixin.FilterCriteriaProperty(*, filters=None)

Bases: object

An object that contains the filters for an event source.

Parameters:

filters (Union[IResolvable, Sequence[Union[IResolvable, FilterProperty, Dict[str, Any]]], None]) – A list of filters.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-filtercriteria.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.mixins_preview.aws_lambda import mixins as lambda_mixins

filter_criteria_property = lambda_mixins.CfnEventSourceMappingPropsMixin.FilterCriteriaProperty(
    filters=[lambda_mixins.CfnEventSourceMappingPropsMixin.FilterProperty(
        pattern="pattern"
    )]
)

Attributes

filters

A list of filters.

See:

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

FilterProperty

class CfnEventSourceMappingPropsMixin.FilterProperty(*, pattern=None)

Bases: object

A structure within a FilterCriteria object that defines an event filtering pattern.

Parameters:

pattern (Optional[str]) – A filter pattern. For more information on the syntax of a filter pattern, see Filter rule syntax .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-filter.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.mixins_preview.aws_lambda import mixins as lambda_mixins

filter_property = lambda_mixins.CfnEventSourceMappingPropsMixin.FilterProperty(
    pattern="pattern"
)

Attributes

pattern

A filter pattern.

For more information on the syntax of a filter pattern, see Filter rule syntax .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-filter.html#cfn-lambda-eventsourcemapping-filter-pattern

LoggingConfigProperty

class CfnEventSourceMappingPropsMixin.LoggingConfigProperty(*, system_log_level=None)

Bases: object

The function’s Amazon CloudWatch Logs configuration settings.

Parameters:

system_log_level (Optional[str]) – Set this property to filter the system logs for your function that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, where DEBUG is the highest level and WARN is the lowest.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-loggingconfig.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.mixins_preview.aws_lambda import mixins as lambda_mixins

logging_config_property = lambda_mixins.CfnEventSourceMappingPropsMixin.LoggingConfigProperty(
    system_log_level="systemLogLevel"
)

Attributes

system_log_level

Set this property to filter the system logs for your function that Lambda sends to CloudWatch.

Lambda only sends system logs at the selected level of detail and lower, where DEBUG is the highest level and WARN is the lowest.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-loggingconfig.html#cfn-lambda-eventsourcemapping-loggingconfig-systemloglevel

MetricsConfigProperty

class CfnEventSourceMappingPropsMixin.MetricsConfigProperty(*, metrics=None)

Bases: object

The metrics configuration for your event source.

Use this configuration object to define which metrics you want your event source mapping to produce.

Parameters:

metrics (Optional[Sequence[str]]) – The metrics you want your event source mapping to produce. Include EventCount to receive event source mapping metrics related to the number of events processed by your event source mapping. For more information about these metrics, see Event source mapping metrics .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-metricsconfig.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.mixins_preview.aws_lambda import mixins as lambda_mixins

metrics_config_property = lambda_mixins.CfnEventSourceMappingPropsMixin.MetricsConfigProperty(
    metrics=["metrics"]
)

Attributes

metrics

The metrics you want your event source mapping to produce.

Include EventCount to receive event source mapping metrics related to the number of events processed by your event source mapping. For more information about these metrics, see Event source mapping metrics .

See:

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

OnFailureProperty

class CfnEventSourceMappingPropsMixin.OnFailureProperty(*, destination=None)

Bases: object

A destination for events that failed processing.

For more information, see Adding a destination .

Parameters:

destination (Optional[str]) –

The Amazon Resource Name (ARN) of the destination resource. To retain records of failed invocations from Kinesis , DynamoDB , self-managed Apache Kafka , or Amazon MSK , you can configure an Amazon SNS topic, Amazon SQS queue, Amazon S3 bucket, or Kafka topic as the destination. .. epigraph:: Amazon SNS destinations have a message size limit of 256 KB. If the combined size of the function request and response payload exceeds the limit, Lambda will drop the payload when sending OnFailure event to the destination. For details on this behavior, refer to Retaining records of asynchronous invocations . To retain records of failed invocations from Kinesis , DynamoDB , self-managed Kafka or Amazon MSK , you can configure an Amazon SNS topic, Amazon SQS queue, or Amazon S3 bucket as the destination.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-onfailure.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.mixins_preview.aws_lambda import mixins as lambda_mixins

on_failure_property = lambda_mixins.CfnEventSourceMappingPropsMixin.OnFailureProperty(
    destination="destination"
)

Attributes

destination

The Amazon Resource Name (ARN) of the destination resource.

To retain records of failed invocations from Kinesis , DynamoDB , self-managed Apache Kafka , or Amazon MSK , you can configure an Amazon SNS topic, Amazon SQS queue, Amazon S3 bucket, or Kafka topic as the destination. .. epigraph:

Amazon SNS destinations have a message size limit of 256 KB. If the combined size of the function request and response payload exceeds the limit, Lambda will drop the payload when sending ``OnFailure`` event to the destination. For details on this behavior, refer to `Retaining records of asynchronous invocations <https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html>`_ .

To retain records of failed invocations from Kinesis , DynamoDB , self-managed Kafka or Amazon MSK , you can configure an Amazon SNS topic, Amazon SQS queue, or Amazon S3 bucket as the destination.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-onfailure.html#cfn-lambda-eventsourcemapping-onfailure-destination

ProvisionedPollerConfigProperty

class CfnEventSourceMappingPropsMixin.ProvisionedPollerConfigProperty(*, maximum_pollers=None, minimum_pollers=None, poller_group_name=None)

Bases: object

The provisioned mode configuration for the event source. Use Provisioned Mode to customize the minimum and maximum number of event pollers for your event source.

Parameters:
  • maximum_pollers (Union[int, float, None]) – The maximum number of event pollers this event source can scale up to. For Amazon SQS events source mappings, default is 200, and minimum value allowed is 2. For Amazon MSK and self-managed Apache Kafka event source mappings, default is 200, and minimum value allowed is 1.

  • minimum_pollers (Union[int, float, None]) – The minimum number of event pollers this event source can scale down to. For Amazon SQS events source mappings, default is 2, and minimum 2 required. For Amazon MSK and self-managed Apache Kafka event source mappings, default is 1.

  • poller_group_name (Optional[str]) – (Amazon MSK and self-managed Apache Kafka) The name of the provisioned poller group. Use this option to group multiple ESMs within the event source’s VPC to share Event Poller Unit (EPU) capacity. You can use this option to optimize Provisioned mode costs for your ESMs. You can group up to 100 ESMs per poller group and aggregate maximum pollers across all ESMs in a group cannot exceed 2000.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-provisionedpollerconfig.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.mixins_preview.aws_lambda import mixins as lambda_mixins

provisioned_poller_config_property = lambda_mixins.CfnEventSourceMappingPropsMixin.ProvisionedPollerConfigProperty(
    maximum_pollers=123,
    minimum_pollers=123,
    poller_group_name="pollerGroupName"
)

Attributes

maximum_pollers

The maximum number of event pollers this event source can scale up to.

For Amazon SQS events source mappings, default is 200, and minimum value allowed is 2. For Amazon MSK and self-managed Apache Kafka event source mappings, default is 200, and minimum value allowed is 1.

See:

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

minimum_pollers

The minimum number of event pollers this event source can scale down to.

For Amazon SQS events source mappings, default is 2, and minimum 2 required. For Amazon MSK and self-managed Apache Kafka event source mappings, default is 1.

See:

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

poller_group_name

(Amazon MSK and self-managed Apache Kafka) The name of the provisioned poller group.

Use this option to group multiple ESMs within the event source’s VPC to share Event Poller Unit (EPU) capacity. You can use this option to optimize Provisioned mode costs for your ESMs. You can group up to 100 ESMs per poller group and aggregate maximum pollers across all ESMs in a group cannot exceed 2000.

See:

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

ScalingConfigProperty

class CfnEventSourceMappingPropsMixin.ScalingConfigProperty(*, maximum_concurrency=None)

Bases: object

(Amazon SQS only) The scaling configuration for the event source.

To remove the configuration, pass an empty value.

Parameters:

maximum_concurrency (Union[int, float, None]) – Limits the number of concurrent instances that the Amazon SQS event source can invoke.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-scalingconfig.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.mixins_preview.aws_lambda import mixins as lambda_mixins

scaling_config_property = lambda_mixins.CfnEventSourceMappingPropsMixin.ScalingConfigProperty(
    maximum_concurrency=123
)

Attributes

maximum_concurrency

Limits the number of concurrent instances that the Amazon SQS event source can invoke.

See:

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

SchemaRegistryAccessConfigProperty

class CfnEventSourceMappingPropsMixin.SchemaRegistryAccessConfigProperty(*, type=None, uri=None)

Bases: object

Specific access configuration settings that tell Lambda how to authenticate with your schema registry.

If you’re working with an AWS Glue schema registry, don’t provide authentication details in this object. Instead, ensure that your execution role has the required permissions for Lambda to access your cluster.

If you’re working with a Confluent schema registry, choose the authentication method in the Type field, and provide the AWS Secrets Manager secret ARN in the URI field.

Parameters:
  • type (Optional[str]) – The type of authentication Lambda uses to access your schema registry.

  • uri (Optional[str]) – The URI of the secret (Secrets Manager secret ARN) to authenticate with your schema registry.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-schemaregistryaccessconfig.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.mixins_preview.aws_lambda import mixins as lambda_mixins

schema_registry_access_config_property = lambda_mixins.CfnEventSourceMappingPropsMixin.SchemaRegistryAccessConfigProperty(
    type="type",
    uri="uri"
)

Attributes

type

The type of authentication Lambda uses to access your schema registry.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-schemaregistryaccessconfig.html#cfn-lambda-eventsourcemapping-schemaregistryaccessconfig-type

uri

The URI of the secret (Secrets Manager secret ARN) to authenticate with your schema registry.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-schemaregistryaccessconfig.html#cfn-lambda-eventsourcemapping-schemaregistryaccessconfig-uri

SchemaRegistryConfigProperty

class CfnEventSourceMappingPropsMixin.SchemaRegistryConfigProperty(*, access_configs=None, event_record_format=None, schema_registry_uri=None, schema_validation_configs=None)

Bases: object

Specific configuration settings for a Kafka schema registry.

Parameters:
  • access_configs (Union[IResolvable, Sequence[Union[IResolvable, SchemaRegistryAccessConfigProperty, Dict[str, Any]]], None]) – An array of access configuration objects that tell Lambda how to authenticate with your schema registry.

  • event_record_format (Optional[str]) – The record format that Lambda delivers to your function after schema validation. - Choose JSON to have Lambda deliver the record to your function as a standard JSON object. - Choose SOURCE to have Lambda deliver the record to your function in its original source format. Lambda removes all schema metadata, such as the schema ID, before sending the record to your function.

  • schema_registry_uri (Optional[str]) – The URI for your schema registry. The correct URI format depends on the type of schema registry you’re using. - For AWS Glue schema registries, use the ARN of the registry. - For Confluent schema registries, use the URL of the registry.

  • schema_validation_configs (Union[IResolvable, Sequence[Union[IResolvable, SchemaValidationConfigProperty, Dict[str, Any]]], None]) – An array of schema validation configuration objects, which tell Lambda the message attributes you want to validate and filter using your schema registry.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-schemaregistryconfig.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.mixins_preview.aws_lambda import mixins as lambda_mixins

schema_registry_config_property = lambda_mixins.CfnEventSourceMappingPropsMixin.SchemaRegistryConfigProperty(
    access_configs=[lambda_mixins.CfnEventSourceMappingPropsMixin.SchemaRegistryAccessConfigProperty(
        type="type",
        uri="uri"
    )],
    event_record_format="eventRecordFormat",
    schema_registry_uri="schemaRegistryUri",
    schema_validation_configs=[lambda_mixins.CfnEventSourceMappingPropsMixin.SchemaValidationConfigProperty(
        attribute="attribute"
    )]
)

Attributes

access_configs

An array of access configuration objects that tell Lambda how to authenticate with your schema registry.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-schemaregistryconfig.html#cfn-lambda-eventsourcemapping-schemaregistryconfig-accessconfigs

event_record_format

The record format that Lambda delivers to your function after schema validation.

  • Choose JSON to have Lambda deliver the record to your function as a standard JSON object.

  • Choose SOURCE to have Lambda deliver the record to your function in its original source format. Lambda removes all schema metadata, such as the schema ID, before sending the record to your function.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-schemaregistryconfig.html#cfn-lambda-eventsourcemapping-schemaregistryconfig-eventrecordformat

schema_registry_uri

The URI for your schema registry. The correct URI format depends on the type of schema registry you’re using.

  • For AWS Glue schema registries, use the ARN of the registry.

  • For Confluent schema registries, use the URL of the registry.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-schemaregistryconfig.html#cfn-lambda-eventsourcemapping-schemaregistryconfig-schemaregistryuri

schema_validation_configs

An array of schema validation configuration objects, which tell Lambda the message attributes you want to validate and filter using your schema registry.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-schemaregistryconfig.html#cfn-lambda-eventsourcemapping-schemaregistryconfig-schemavalidationconfigs

SchemaValidationConfigProperty

class CfnEventSourceMappingPropsMixin.SchemaValidationConfigProperty(*, attribute=None)

Bases: object

Specific schema validation configuration settings that tell Lambda the message attributes you want to validate and filter using your schema registry.

Parameters:

attribute (Optional[str]) – The attributes you want your schema registry to validate and filter for. If you selected JSON as the EventRecordFormat , Lambda also deserializes the selected message attributes.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-schemavalidationconfig.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.mixins_preview.aws_lambda import mixins as lambda_mixins

schema_validation_config_property = lambda_mixins.CfnEventSourceMappingPropsMixin.SchemaValidationConfigProperty(
    attribute="attribute"
)

Attributes

attribute

The attributes you want your schema registry to validate and filter for.

If you selected JSON as the EventRecordFormat , Lambda also deserializes the selected message attributes.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-schemavalidationconfig.html#cfn-lambda-eventsourcemapping-schemavalidationconfig-attribute

SelfManagedEventSourceProperty

class CfnEventSourceMappingPropsMixin.SelfManagedEventSourceProperty(*, endpoints=None)

Bases: object

The self-managed Apache Kafka cluster for your event source.

Parameters:

endpoints (Union[IResolvable, EndpointsProperty, Dict[str, Any], None]) – The list of bootstrap servers for your Kafka brokers in the following format: "KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"] .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-selfmanagedeventsource.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.mixins_preview.aws_lambda import mixins as lambda_mixins

self_managed_event_source_property = lambda_mixins.CfnEventSourceMappingPropsMixin.SelfManagedEventSourceProperty(
    endpoints=lambda_mixins.CfnEventSourceMappingPropsMixin.EndpointsProperty(
        kafka_bootstrap_servers=["kafkaBootstrapServers"]
    )
)

Attributes

endpoints

"KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"] .

See:

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

Type:

The list of bootstrap servers for your Kafka brokers in the following format

SelfManagedKafkaEventSourceConfigProperty

class CfnEventSourceMappingPropsMixin.SelfManagedKafkaEventSourceConfigProperty(*, consumer_group_id=None, schema_registry_config=None)

Bases: object

Specific configuration settings for a self-managed Apache Kafka event source.

Parameters:
  • consumer_group_id (Optional[str]) –

    The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see Customizable consumer group ID .

  • schema_registry_config (Union[IResolvable, SchemaRegistryConfigProperty, Dict[str, Any], None]) – Specific configuration settings for a Kafka schema registry.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig.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.mixins_preview.aws_lambda import mixins as lambda_mixins

self_managed_kafka_event_source_config_property = lambda_mixins.CfnEventSourceMappingPropsMixin.SelfManagedKafkaEventSourceConfigProperty(
    consumer_group_id="consumerGroupId",
    schema_registry_config=lambda_mixins.CfnEventSourceMappingPropsMixin.SchemaRegistryConfigProperty(
        access_configs=[lambda_mixins.CfnEventSourceMappingPropsMixin.SchemaRegistryAccessConfigProperty(
            type="type",
            uri="uri"
        )],
        event_record_format="eventRecordFormat",
        schema_registry_uri="schemaRegistryUri",
        schema_validation_configs=[lambda_mixins.CfnEventSourceMappingPropsMixin.SchemaValidationConfigProperty(
            attribute="attribute"
        )]
    )
)

Attributes

consumer_group_id

The identifier for the Kafka consumer group to join.

The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see Customizable consumer group ID .

See:

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

schema_registry_config

Specific configuration settings for a Kafka schema registry.

See:

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

SourceAccessConfigurationProperty

class CfnEventSourceMappingPropsMixin.SourceAccessConfigurationProperty(*, type=None, uri=None)

Bases: object

An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.

Parameters:
  • type (Optional[str]) – The type of authentication protocol, VPC components, or virtual host for your event source. For example: "Type":"SASL_SCRAM_512_AUTH" . - BASIC_AUTH – (Amazon MQ) The AWS Secrets Manager secret that stores your broker credentials. - BASIC_AUTH – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL/PLAIN authentication of your Apache Kafka brokers. - VPC_SUBNET – (Self-managed Apache Kafka) The subnets associated with your VPC. Lambda connects to these subnets to fetch data from your self-managed Apache Kafka cluster. - VPC_SECURITY_GROUP – (Self-managed Apache Kafka) The VPC security group used to manage access to your self-managed Apache Kafka brokers. - SASL_SCRAM_256_AUTH – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL SCRAM-256 authentication of your self-managed Apache Kafka brokers. - SASL_SCRAM_512_AUTH – (Amazon MSK, Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL SCRAM-512 authentication of your self-managed Apache Kafka brokers. - VIRTUAL_HOST –- (RabbitMQ) The name of the virtual host in your RabbitMQ broker. Lambda uses this RabbitMQ host as the event source. This property cannot be specified in an UpdateEventSourceMapping API call. - CLIENT_CERTIFICATE_TLS_AUTH – (Amazon MSK, self-managed Apache Kafka) The Secrets Manager ARN of your secret key containing the certificate chain (X.509 PEM), private key (PKCS#8 PEM), and private key password (optional) used for mutual TLS authentication of your MSK/Apache Kafka brokers. - SERVER_ROOT_CA_CERTIFICATE – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key containing the root CA certificate (X.509 PEM) used for TLS encryption of your Apache Kafka brokers.

  • uri (Optional[str]) – The value for your chosen configuration in Type . For example: "URI": "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName" .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.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.mixins_preview.aws_lambda import mixins as lambda_mixins

source_access_configuration_property = lambda_mixins.CfnEventSourceMappingPropsMixin.SourceAccessConfigurationProperty(
    type="type",
    uri="uri"
)

Attributes

type

"Type":"SASL_SCRAM_512_AUTH" .

  • BASIC_AUTH – (Amazon MQ) The AWS Secrets Manager secret that stores your broker credentials.

  • BASIC_AUTH – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL/PLAIN authentication of your Apache Kafka brokers.

  • VPC_SUBNET – (Self-managed Apache Kafka) The subnets associated with your VPC. Lambda connects to these subnets to fetch data from your self-managed Apache Kafka cluster.

  • VPC_SECURITY_GROUP – (Self-managed Apache Kafka) The VPC security group used to manage access to your self-managed Apache Kafka brokers.

  • SASL_SCRAM_256_AUTH – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL SCRAM-256 authentication of your self-managed Apache Kafka brokers.

  • SASL_SCRAM_512_AUTH – (Amazon MSK, Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL SCRAM-512 authentication of your self-managed Apache Kafka brokers.

  • VIRTUAL_HOST –- (RabbitMQ) The name of the virtual host in your RabbitMQ broker. Lambda uses this RabbitMQ host as the event source. This property cannot be specified in an UpdateEventSourceMapping API call.

  • CLIENT_CERTIFICATE_TLS_AUTH – (Amazon MSK, self-managed Apache Kafka) The Secrets Manager ARN of your secret key containing the certificate chain (X.509 PEM), private key (PKCS#8 PEM), and private key password (optional) used for mutual TLS authentication of your MSK/Apache Kafka brokers.

  • SERVER_ROOT_CA_CERTIFICATE – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key containing the root CA certificate (X.509 PEM) used for TLS encryption of your Apache Kafka brokers.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-type

Type:

The type of authentication protocol, VPC components, or virtual host for your event source. For example

uri

The value for your chosen configuration in Type .

For example: "URI": "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName" .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-uri