createEventSourceMapping (original) (raw)

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 DynamoDB and Kinesis event sources:

For stream sources (DynamoDB, Kinesis, Amazon MSK, and self-managed Apache Kafka), the following option is also available:

For information about which configuration parameters apply to each event source, see the following topics.

Samples


fun main() { 
   //sampleStart 
   // The following example creates a mapping between an SQS queue and the my function Lambda function.
val resp = lambdaClient.createEventSourceMapping {
    eventSourceArn = "arn:aws:sqs:us-west-2:123456789012:my-queue"
    functionName = "my-function"
    batchSize = 5
} 
   //sampleEnd
}