Class KinesisEventSourceProps
Inheritance
Namespace: Amazon.CDK.AWS.Lambda.EventSources
Assembly: Amazon.CDK.Lib.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. |
Filters | Add filter criteria option. |
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. |
StartingPositionTimestamp | The time from which to start reading, in Unix time seconds. |
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
Filters
Add filter criteria option.
public IDictionary<string, object>[] Filters { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>[]
Remarks
Default: - None
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) for Kinesis, DynamoDB, and SQS event sources, Duration.millis(500) for MSK, self-managed Kafka, and Amazon MQ.
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:
The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records. Record are valid until it expires in the event source.
Default: -1
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
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.
Default: -1
StartingPosition
Where to begin consuming the stream.
public StartingPosition StartingPosition { get; set; }
Property Value
StartingPositionTimestamp
The time from which to start reading, in Unix time seconds.
public Nullable<double> StartingPositionTimestamp { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Default: - no timestamp
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