Class DynamoEventSource
Use an Amazon DynamoDB stream as an event source for AWS Lambda.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.Lambda.EventSources
Assembly: Amazon.CDK.AWS.Lambda.EventSources.dll
Syntax (csharp)
public class DynamoEventSource : StreamEventSource, IEventSource
Syntax (vb)
Public Class DynamoEventSource
Inherits StreamEventSource
Implements IEventSource
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.DynamoDB;
using Amazon.CDK.AWS.Lambda.EventSources;
Table table;
Function fn;
var deadLetterQueue = new Queue(this, "deadLetterQueue");
fn.AddEventSource(new DynamoEventSource(table, new DynamoEventSourceProps {
StartingPosition = StartingPosition.TRIM_HORIZON,
BatchSize = 5,
BisectBatchOnError = true,
OnFailure = new SqsDlq(deadLetterQueue),
RetryAttempts = 10
}));
Synopsis
Constructors
DynamoEventSource(ITable, IDynamoEventSourceProps) | |
DynamoEventSource(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
DynamoEventSource(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
EventSourceMappingId | The identifier for this EventSourceMapping. |
Methods
Bind(IFunction) | Called by |
Constructors
DynamoEventSource(ITable, IDynamoEventSourceProps)
public DynamoEventSource(ITable table, IDynamoEventSourceProps props)
Parameters
- table ITable
- props IDynamoEventSourceProps
DynamoEventSource(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected DynamoEventSource(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
DynamoEventSource(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected DynamoEventSource(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
EventSourceMappingId
The identifier for this EventSourceMapping.
public virtual string EventSourceMappingId { get; }
Property Value
System.String
Methods
Bind(IFunction)
Called by lambda.addEventSource
to allow the event source to bind to this function.
public override void Bind(IFunction target)
Parameters
- target IFunction