Class StreamEventSourceProps
The set of properties for streaming event sources shared by Dynamo and Kinesis.
Inheritance
Namespace: Amazon.CDK.AWS.Lambda.EventSources
Assembly: Amazon.CDK.AWS.Lambda.EventSources.dll
Syntax (csharp)
public class StreamEventSourceProps : Object, IStreamEventSourceProps, IBaseStreamEventSourceProps
Syntax (vb)
Public Class StreamEventSourceProps
Inherits Object
Implements IStreamEventSourceProps, IBaseStreamEventSourceProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lambda;
using Amazon.CDK.AWS.Lambda.EventSources;
using Amazon.CDK;
IEventSourceDlq eventSourceDlq;
var streamEventSourceProps = new StreamEventSourceProps {
StartingPosition = StartingPosition.TRIM_HORIZON,
// the properties below are optional
BatchSize = 123,
BisectBatchOnError = false,
Enabled = false,
MaxBatchingWindow = Duration.Minutes(30),
MaxRecordAge = Duration.Minutes(30),
OnFailure = eventSourceDlq,
ParallelizationFactor = 123,
ReportBatchItemFailures = false,
RetryAttempts = 123,
TumblingWindow = Duration.Minutes(30)
};
Synopsis
Constructors
StreamEventSourceProps() |
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
StreamEventSourceProps()
public StreamEventSourceProps()
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