Class KinesisEventSourceProps
Inheritance
Namespace: Amazon.CDK.AWS.Lambda.EventSources
Assembly: Amazon.CDK.AWS.Lambda.EventSources.dll
Syntax (csharp)
public class KinesisEventSourceProps : Object, IKinesisEventSourceProps, IStreamEventSourceProps, IBaseStreamEventSourceProps
Syntax (vb)
Public Class KinesisEventSourceProps
Inherits Object
Implements IKinesisEventSourceProps, IStreamEventSourceProps, IBaseStreamEventSourceProps
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Kinesis;
using Amazon.CDK.AWS.Lambda.EventSources;
Function myFunction;
var stream = new Stream(this, "MyStream");
myFunction.AddEventSource(new KinesisEventSource(stream, new KinesisEventSourceProps {
BatchSize = 100, // default
StartingPosition = StartingPosition.TRIM_HORIZON
}));
Synopsis
Constructors
KinesisEventSourceProps() |
Properties
BatchSize | The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function. |
BisectBatchOnError | If the function returns an error, split the batch in two and retry. |
Enabled | If the stream event source mapping should be enabled. |
MaxBatchingWindow | The maximum amount of time to gather records before invoking the function. |
MaxRecordAge | The maximum age of a record that Lambda sends to a function for processing. |
OnFailure | An Amazon SQS queue or Amazon SNS topic destination for discarded records. |
ParallelizationFactor | The number of batches to process from each shard concurrently. |
ReportBatchItemFailures | Allow functions to return partially successful responses for a batch of records. |
RetryAttempts | Maximum number of retry attempts Valid Range: * Minimum value of 0 * Maximum value of 10000. |
StartingPosition | Where to begin consuming the stream. |
TumblingWindow | The size of the tumbling windows to group records sent to DynamoDB or Kinesis Valid Range: 0 - 15 minutes. |
Constructors
KinesisEventSourceProps()
public KinesisEventSourceProps()
Properties
BatchSize
The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function.
public Nullable<double> BatchSize { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Your function receives an event with all the retrieved records.
Valid Range:
Default: 100
BisectBatchOnError
If the function returns an error, split the batch in two and retry.
public Nullable<bool> BisectBatchOnError { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
Enabled
If the stream event source mapping should be enabled.
public Nullable<bool> Enabled { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
MaxBatchingWindow
The maximum amount of time to gather records before invoking the function.
public Duration MaxBatchingWindow { get; set; }
Property Value
Remarks
Maximum of Duration.minutes(5)
Default: Duration.seconds(0)
MaxRecordAge
The maximum age of a record that Lambda sends to a function for processing.
public Duration MaxRecordAge { get; set; }
Property Value
Remarks
Valid Range:
Default: - the retention period configured on the stream
OnFailure
An Amazon SQS queue or Amazon SNS topic destination for discarded records.
public IEventSourceDlq OnFailure { get; set; }
Property Value
Remarks
Default: - discarded records are ignored
ParallelizationFactor
The number of batches to process from each shard concurrently.
public Nullable<double> ParallelizationFactor { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Valid Range:
Default: 1
ReportBatchItemFailures
Allow functions to return partially successful responses for a batch of records.
public Nullable<bool> ReportBatchItemFailures { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
RetryAttempts
Maximum number of retry attempts Valid Range: * Minimum value of 0 * Maximum value of 10000.
public Nullable<double> RetryAttempts { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Default: - retry until the record expires
StartingPosition
Where to begin consuming the stream.
public StartingPosition StartingPosition { get; set; }
Property Value
TumblingWindow
The size of the tumbling windows to group records sent to DynamoDB or Kinesis Valid Range: 0 - 15 minutes.
public Duration TumblingWindow { get; set; }
Property Value
Remarks
Default: - None