Creates a mapping between an event source and an Lambda function. Lambda reads items from the event source and invokes the function.
For details about how to configure different event sources, see the following topics.
The following error handling options are available only for stream sources (DynamoDB and Kinesis):
-
BisectBatchOnFunctionError – If the function returns an error, split the batch in two and retry.
-
DestinationConfig – Send discarded records to an Amazon SQS queue or Amazon SNS topic.
-
MaximumRecordAgeInSeconds – Discard records older than the specified age. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires
-
MaximumRetryAttempts – Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.
-
ParallelizationFactor – Process multiple batches from each shard concurrently.
For information about which configuration parameters apply to each event source, see the following topics.
Request body
(Kinesis and DynamoDB Streams only) The number of batches to process from each shard concurrently.
The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources. <code>AT_TIMESTAMP</code> is supported only for Amazon Kinesis streams and Amazon DocumentDB.
With <code>StartingPosition</code> set to <code>AT_TIMESTAMP</code>, the time from which to start reading.
(Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is infinite (-1).
(Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry.
(Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.
(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.
The name of the Kafka topic.
(MQ) The name of the Amazon MQ broker destination queue to consume.
(Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type enums applied to the event source mapping.
Response
Success
The identifier of the event source mapping.
The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, and Amazon MSK stream sources. <code>AT_TIMESTAMP</code> is supported only for Amazon Kinesis streams and Amazon DocumentDB.
With <code>StartingPosition</code> set to <code>AT_TIMESTAMP</code>, the time from which to start reading.
(Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1.
The Amazon Resource Name (ARN) of the event source.
The ARN of the Lambda function.
The date that the event source mapping was last updated or that its state changed.
The result of the last Lambda invocation of your function.
The state of the event source mapping. It can be one of the following: <code>Creating</code>, <code>Enabling</code>, <code>Enabled</code>, <code>Disabling</code>, <code>Disabled</code>, <code>Updating</code>, or <code>Deleting</code>.
Indicates whether a user or Lambda made the last change to the event source mapping.
The name of the Kafka topic.
(Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
(Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. The default value is false.
(Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.
(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.
(Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type enums applied to the event source mapping.