AWS SDK Version 2 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

.NET Framework 4.5
Container for the parameters to the CreateEventSourceMapping operation. Identifies a stream as an event source for a Lambda function. It can be either an Amazon Kinesis stream or an Amazon DynamoDB stream. AWS Lambda invokes the specified function when records are posted to the stream.

This association between a stream source and a Lambda function is called the event source mapping.

This event source mapping is relevant only in the AWS Lambda pull model, where AWS Lambda invokes the function. For more information, go to AWS Lambda: How it Works in the AWS Lambda Developer Guide.

You provide mapping information (for example, which stream to read from and which Lambda function to invoke) in the request body.

Each event source, such as an Amazon Kinesis or a DynamoDB stream, can be associated with multiple AWS Lambda function. A given Lambda function can be associated with multiple AWS event sources.

If you are using versioning, you can specify a specific function version or an alias via the function name parameter. For more information about versioning, see AWS Lambda Function Versioning and Aliases.

This operation requires permission for the lambda:CreateEventSourceMapping action.

Inheritance Hierarchy


Namespace: Amazon.Lambda.Model
Assembly: AWSSDK.dll
Version: (assembly version)


public class CreateEventSourceMappingRequest : AmazonLambdaRequest

The CreateEventSourceMappingRequest type exposes the following members



Public Property BatchSize System.Int32 Gets and sets the property BatchSize.

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. The default is 100 records.

Public Property Enabled System.Boolean Gets and sets the property Enabled.

Indicates whether AWS Lambda should begin polling the event source. By default, Enabled is true.

Public Property EventSourceArn System.String Gets and sets the property EventSourceArn.

The Amazon Resource Name (ARN) of the Amazon Kinesis or the Amazon DynamoDB stream that is the event source. Any record added to this stream could cause AWS Lambda to invoke your Lambda function, it depends on the BatchSize. AWS Lambda POSTs the Amazon Kinesis event, containing records, to your Lambda function as JSON.

Public Property FunctionName System.String Gets and sets the property FunctionName.

The Lambda function to invoke when AWS Lambda detects an event on the stream.

You can specify the function name (for example, Thumbnail) or you can specify Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).

If you are using versioning, you can also provide a qualified function ARN (ARN that is qualified with function version or alias name as suffix). For more information about versioning, see AWS Lambda Function Versioning and Aliases

AWS Lambda also allows you to specify only the function name with the account ID qualifier (for example, account-id:Thumbnail).

Note that the length constraint applies only to the ARN. If you specify only the function name, it is limited to 64 character in length.

Public Property StartingPosition Amazon.Lambda.EventSourcePosition Gets and sets the property StartingPosition.

The position in the stream where AWS Lambda should start reading. For more information, go to ShardIteratorType in the Amazon Kinesis API Reference.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

.NET for Windows Store apps:
Supported in: Windows 8.1, Windows 8

.NET for Windows Phone:
Supported in: Windows Phone 8.1, Windows Phone 8