Bases: EventSourceMappingOptions
Properties for declaring a new event source mapping.
batch_size (Union
[int
, float
, None
]) â The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function. Your function receives an event with all the retrieved records. Valid Range: Minimum value of 1. Maximum value of 10000. Default: - Amazon Kinesis, Amazon DynamoDB, and Amazon MSK is 100 records. The default for Amazon SQS is 10 messages. For standard SQS queues, the maximum is 10,000. For FIFO SQS queues, the maximum is 10.
bisect_batch_on_error (Optional
[bool
]) â If the function returns an error, split the batch in two and retry. Default: false
enabled (Optional
[bool
]) â Set to false to disable the event source upon creation. Default: true
event_source_arn (Optional
[str
]) â The Amazon Resource Name (ARN) of the event source. Any record added to this stream can invoke the Lambda function. Default: - not set if using a self managed Kafka cluster, throws an error otherwise
kafka_bootstrap_servers (Optional
[Sequence
[str
]]) â A list of host and port pairs that are the addresses of the Kafka brokers in a self managed âbootstrapâ Kafka cluster that a Kafka client connects to initially to bootstrap itself. They are in the format abc.example.com:9096
. Default: - none
kafka_topic (Optional
[str
]) â The name of the Kafka topic. Default: - no topic
max_batching_window (Optional
[Duration
]) â The maximum amount of time to gather records before invoking the function. Maximum of Duration.minutes(5) Default: Duration.seconds(0)
max_record_age (Optional
[Duration
]) â The maximum age of a record that Lambda sends to a function for processing. Valid Range: - Minimum value of 60 seconds - Maximum value of 7 days Default: - infinite or until the record expires.
on_failure (Optional
[IEventSourceDlq
]) â An Amazon SQS queue or Amazon SNS topic destination for discarded records. Default: discarded records are ignored
parallelization_factor (Union
[int
, float
, None
]) â The number of batches to process from each shard concurrently. Valid Range: - Minimum value of 1 - Maximum value of 10 Default: 1
report_batch_item_failures (Optional
[bool
]) â Allow functions to return partially successful responses for a batch of records. Default: false
retry_attempts (Union
[int
, float
, None
]) â The maximum number of times to retry when the function returns an error. Set to undefined
if you want lambda to keep retrying infinitely or until the record expires. Valid Range: - Minimum value of 0 - Maximum value of 10000 Default: - infinite or until the record expires.
source_access_configurations (Optional
[Sequence
[Union
[SourceAccessConfiguration
, Dict
[str
, Any
]]]]) â Specific settings like the authentication protocol or the VPC components to secure access to your event source. Default: - none
starting_position (Optional
[StartingPosition
]) â The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should start reading. Default: - Required for Amazon Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources.
tumbling_window (Optional
[Duration
]) â The size of the tumbling windows to group records sent to DynamoDB or Kinesis. Default: - None
target (IFunction
) â The target AWS Lambda function.
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_lambda as lambda_ import aws_cdk.core as cdk # event_source_dlq: lambda.IEventSourceDlq # function_: lambda.Function # source_access_configuration_type: lambda.SourceAccessConfigurationType event_source_mapping_props = lambda.EventSourceMappingProps( target=function_, # the properties below are optional batch_size=123, bisect_batch_on_error=False, enabled=False, event_source_arn="eventSourceArn", kafka_bootstrap_servers=["kafkaBootstrapServers"], kafka_topic="kafkaTopic", max_batching_window=cdk.Duration.minutes(30), max_record_age=cdk.Duration.minutes(30), on_failure=event_source_dlq, parallelization_factor=123, report_batch_item_failures=False, retry_attempts=123, source_access_configurations=[lambda.SourceAccessConfiguration( type=source_access_configuration_type, uri="uri" )], starting_position=lambda_.StartingPosition.TRIM_HORIZON, tumbling_window=cdk.Duration.minutes(30) )
Attributes
The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function.
Your function receives an event with all the retrieved records.
Valid Range: Minimum value of 1. Maximum value of 10000.
Amazon Kinesis, Amazon DynamoDB, and Amazon MSK is 100 records.
The default for Amazon SQS is 10 messages. For standard SQS queues, the maximum is 10,000. For FIFO SQS queues, the maximum is 10.
If the function returns an error, split the batch in two and retry.
false
Set to false to disable the event source upon creation.
true
The Amazon Resource Name (ARN) of the event source.
Any record added to this stream can invoke the Lambda function.
not set if using a self managed Kafka cluster, throws an error otherwise
A list of host and port pairs that are the addresses of the Kafka brokers in a self managed âbootstrapâ Kafka cluster that a Kafka client connects to initially to bootstrap itself.
They are in the format abc.example.com:9096
.
none
The name of the Kafka topic.
no topic
The maximum amount of time to gather records before invoking the function.
Maximum of Duration.minutes(5)
Duration.seconds(0)
The maximum age of a record that Lambda sends to a function for processing.
Valid Range:
Minimum value of 60 seconds
Maximum value of 7 days
infinite or until the record expires.
An Amazon SQS queue or Amazon SNS topic destination for discarded records.
discarded records are ignored
The number of batches to process from each shard concurrently.
Valid Range:
Minimum value of 1
Maximum value of 10
1
Allow functions to return partially successful responses for a batch of records.
The maximum number of times to retry when the function returns an error.
Set to undefined
if you want lambda to keep retrying infinitely or until the record expires.
Valid Range:
Minimum value of 0
Maximum value of 10000
infinite or until the record expires.
Specific settings like the authentication protocol or the VPC components to secure access to your event source.
The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should start reading.
Required for Amazon Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources.
The target AWS Lambda function.
The size of the tumbling windows to group records sent to DynamoDB or Kinesis.
None
https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-windows
Valid Range: 0 - 15 minutes
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4