Class DynamoEventSource

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.lambda.eventsources.StreamEventSource
software.amazon.awscdk.services.lambda.eventsources.DynamoEventSource
All Implemented Interfaces:
IEventSource, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:46.824Z") @Stability(Stable) public class DynamoEventSource extends StreamEventSource
Use an Amazon DynamoDB stream as an event source for AWS Lambda.

Example:

 import software.amazon.awscdk.services.dynamodb.*;
 import software.amazon.awscdk.services.lambda.eventsources.DynamoEventSource;
 import software.amazon.awscdk.services.lambda.eventsources.SqsDlq;
 Table table;
 Function fn;
 Queue deadLetterQueue = new Queue(this, "deadLetterQueue");
 fn.addEventSource(DynamoEventSource.Builder.create(table)
         .startingPosition(StartingPosition.TRIM_HORIZON)
         .batchSize(5)
         .bisectBatchOnError(true)
         .onFailure(new SqsDlq(deadLetterQueue))
         .retryAttempts(10)
         .build());
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for DynamoEventSource.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.amazon.awscdk.services.lambda.IEventSource

    IEventSource.Jsii$Default
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
    protected
    DynamoEventSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    DynamoEventSource(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    bind(IFunction target)
    Called by lambda.addEventSource to allow the event source to bind to this function.
    The identifier for this EventSourceMapping.

    Methods inherited from class software.amazon.awscdk.services.lambda.eventsources.StreamEventSource

    enrichMappingOptions, getProps

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • DynamoEventSource

      protected DynamoEventSource(software.amazon.jsii.JsiiObjectRef objRef)
    • DynamoEventSource

      protected DynamoEventSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • DynamoEventSource

      @Stability(Stable) public DynamoEventSource(@NotNull ITable table, @NotNull DynamoEventSourceProps props)
      Parameters:
      table - This parameter is required.
      props - This parameter is required.
  • Method Details

    • bind

      @Stability(Stable) public void bind(@NotNull IFunction target)
      Called by lambda.addEventSource to allow the event source to bind to this function.

      Specified by:
      bind in interface IEventSource
      Specified by:
      bind in class StreamEventSource
      Parameters:
      target - This parameter is required.
    • getEventSourceMappingId

      @Stability(Stable) @NotNull public String getEventSourceMappingId()
      The identifier for this EventSourceMapping.