public static final class DynamoEventSource.Builder
extends java.lang.Object
DynamoEventSource
.Modifier and Type | Method and Description |
---|---|
DynamoEventSource.Builder |
batchSize(java.lang.Number batchSize)
The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function.
|
DynamoEventSource.Builder |
bisectBatchOnError(java.lang.Boolean bisectBatchOnError)
If the function returns an error, split the batch in two and retry.
|
DynamoEventSource |
build() |
static DynamoEventSource.Builder |
create(ITable table) |
DynamoEventSource.Builder |
enabled(java.lang.Boolean enabled)
If the stream event source mapping should be enabled.
|
DynamoEventSource.Builder |
maxBatchingWindow(Duration maxBatchingWindow)
The maximum amount of time to gather records before invoking the function.
|
DynamoEventSource.Builder |
maxRecordAge(Duration maxRecordAge)
The maximum age of a record that Lambda sends to a function for processing.
|
DynamoEventSource.Builder |
onFailure(IEventSourceDlq onFailure)
An Amazon SQS queue or Amazon SNS topic destination for discarded records.
|
DynamoEventSource.Builder |
parallelizationFactor(java.lang.Number parallelizationFactor)
The number of batches to process from each shard concurrently.
|
DynamoEventSource.Builder |
reportBatchItemFailures(java.lang.Boolean reportBatchItemFailures)
Allow functions to return partially successful responses for a batch of records.
|
DynamoEventSource.Builder |
retryAttempts(java.lang.Number retryAttempts)
Maximum number of retry attempts Valid Range: * Minimum value of 0 * Maximum value of 10000.
|
DynamoEventSource.Builder |
startingPosition(StartingPosition startingPosition)
Where to begin consuming the stream.
|
DynamoEventSource.Builder |
tumblingWindow(Duration tumblingWindow)
The size of the tumbling windows to group records sent to DynamoDB or Kinesis Valid Range: 0 - 15 minutes.
|
public static DynamoEventSource.Builder create(ITable table)
table
- This parameter is required.DynamoEventSource.Builder
.public DynamoEventSource.Builder startingPosition(StartingPosition startingPosition)
startingPosition
- Where to begin consuming the stream. This parameter is required.this
public DynamoEventSource.Builder batchSize(java.lang.Number batchSize)
Your function receives an event with all the retrieved records.
Valid Range:
Default: 100
batchSize
- The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function. This parameter is required.this
public DynamoEventSource.Builder enabled(java.lang.Boolean enabled)
Default: true
enabled
- If the stream event source mapping should be enabled. This parameter is required.this
public DynamoEventSource.Builder maxBatchingWindow(Duration maxBatchingWindow)
Maximum of Duration.minutes(5)
Default: Duration.seconds(0)
maxBatchingWindow
- The maximum amount of time to gather records before invoking the function. This parameter is required.this
public DynamoEventSource.Builder bisectBatchOnError(java.lang.Boolean bisectBatchOnError)
Default: false
bisectBatchOnError
- If the function returns an error, split the batch in two and retry. This parameter is required.this
public DynamoEventSource.Builder maxRecordAge(Duration maxRecordAge)
Valid Range:
Default: - the retention period configured on the stream
maxRecordAge
- The maximum age of a record that Lambda sends to a function for processing. This parameter is required.this
public DynamoEventSource.Builder onFailure(IEventSourceDlq onFailure)
Default: - discarded records are ignored
onFailure
- An Amazon SQS queue or Amazon SNS topic destination for discarded records. This parameter is required.this
public DynamoEventSource.Builder parallelizationFactor(java.lang.Number parallelizationFactor)
Valid Range:
Default: 1
parallelizationFactor
- The number of batches to process from each shard concurrently. This parameter is required.this
public DynamoEventSource.Builder reportBatchItemFailures(java.lang.Boolean reportBatchItemFailures)
Default: false
reportBatchItemFailures
- Allow functions to return partially successful responses for a batch of records. This parameter is required.this
public DynamoEventSource.Builder retryAttempts(java.lang.Number retryAttempts)
Default: - retry until the record expires
retryAttempts
- Maximum number of retry attempts Valid Range: * Minimum value of 0 * Maximum value of 10000. This parameter is required.this
public DynamoEventSource.Builder tumblingWindow(Duration tumblingWindow)
Default: - None
tumblingWindow
- The size of the tumbling windows to group records sent to DynamoDB or Kinesis Valid Range: 0 - 15 minutes. This parameter is required.this
public DynamoEventSource build()