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.121.0 (build d7af9b9)",
date="2025-12-18T18:20:12.856Z")
@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.lambda.eventsources.*;
import software.amazon.awscdk.services.dynamodb.*;
Function fn;
Table table = Table.Builder.create(this, "Table")
.partitionKey(Attribute.builder()
.name("id")
.type(AttributeType.STRING)
.build())
.stream(StreamViewType.NEW_IMAGE)
.build();
fn.addEventSource(DynamoEventSource.Builder.create(table)
.startingPosition(StartingPosition.LATEST)
.metricsConfig(MetricsConfig.builder()
.metrics(List.of(MetricType.EVENT_COUNT))
.build())
.build());
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.lambda.IEventSource
IEventSource.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionDynamoEventSource(ITable table, DynamoEventSourceProps props) protectedDynamoEventSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedDynamoEventSource(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled bylambda.addEventSourceto allow the event source to bind to this function.The ARN for this EventSourceMapping.The identifier for this EventSourceMapping.Methods inherited from class software.amazon.awscdk.services.lambda.eventsources.StreamEventSource
enrichMappingOptions, getPropsMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
Called bylambda.addEventSourceto allow the event source to bind to this function.- Specified by:
bindin interfaceIEventSource- Specified by:
bindin classStreamEventSource- Parameters:
target- This parameter is required.
-
getEventSourceMappingArn
The ARN for this EventSourceMapping. -
getEventSourceMappingId
The identifier for this EventSourceMapping.
-