Interface StreamEventSourceProps
- All Superinterfaces:
BaseStreamEventSourceProps,software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
DynamoEventSourceProps,KinesisEventSourceProps
- All Known Implementing Classes:
DynamoEventSourceProps.Jsii$Proxy,KinesisEventSourceProps.Jsii$Proxy,StreamEventSourceProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)",
date="2025-12-18T18:20:12.886Z")
@Stability(Stable)
public interface StreamEventSourceProps
extends software.amazon.jsii.JsiiSerializable, BaseStreamEventSourceProps
The set of properties for streaming event sources shared by Dynamo and Kinesis.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.kms.*;
import software.amazon.awscdk.services.lambda.*;
import software.amazon.awscdk.services.lambda.eventsources.*;
IEventSourceDlq eventSourceDlq;
Object filters;
Key key;
StreamEventSourceProps streamEventSourceProps = StreamEventSourceProps.builder()
.startingPosition(StartingPosition.TRIM_HORIZON)
// the properties below are optional
.batchSize(123)
.bisectBatchOnError(false)
.enabled(false)
.filterEncryption(key)
.filters(List.of(Map.of(
"filtersKey", filters)))
.maxBatchingWindow(Duration.minutes(30))
.maxRecordAge(Duration.minutes(30))
.metricsConfig(MetricsConfig.builder()
.metrics(List.of(MetricType.EVENT_COUNT))
.build())
.onFailure(eventSourceDlq)
.parallelizationFactor(123)
.provisionedPollerConfig(ProvisionedPollerConfig.builder()
.maximumPollers(123)
.minimumPollers(123)
// the properties below are optional
.pollerGroupName("pollerGroupName")
.build())
.reportBatchItemFailures(false)
.retryAttempts(123)
.tumblingWindow(Duration.minutes(30))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forStreamEventSourcePropsstatic final classAn implementation forStreamEventSourceProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default BooleanIf the function returns an error, split the batch in two and retry.default IKeyAdd Customer managed KMS key to encrypt Filter Criteria.Add filter criteria option.default DurationThe maximum age of a record that Lambda sends to a function for processing.default MetricsConfigConfiguration for enhanced monitoring metrics collection When specified, enables collection of additional metrics for the stream event source.default IEventSourceDlqAn Amazon S3, Amazon SQS queue or Amazon SNS topic destination for discarded records.default NumberThe number of batches to process from each shard concurrently.default BooleanAllow functions to return partially successful responses for a batch of records.default NumberMaximum number of retry attempts.default DurationThe size of the tumbling windows to group records sent to DynamoDB or Kinesis Valid Range: 0 - 15 minutes.Methods inherited from interface software.amazon.awscdk.services.lambda.eventsources.BaseStreamEventSourceProps
getBatchSize, getEnabled, getMaxBatchingWindow, getProvisionedPollerConfig, getStartingPositionMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getBisectBatchOnError
If the function returns an error, split the batch in two and retry.Default: false
-
getFilterEncryption
Add Customer managed KMS key to encrypt Filter Criteria.Default: - none
- See Also:
-
getFilters
Add filter criteria option.Default: - None
-
getMaxRecordAge
The maximum age of a record that Lambda sends to a function for processing.Valid Range:
- Minimum value of 60 seconds
- Maximum value of 7 days
The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records. Record are valid until it expires in the event source.
Default: -1
-
getMetricsConfig
Configuration for enhanced monitoring metrics collection When specified, enables collection of additional metrics for the stream event source.Default: - Enhanced monitoring is disabled
-
getOnFailure
An Amazon S3, Amazon SQS queue or Amazon SNS topic destination for discarded records.Default: - discarded records are ignored
-
getParallelizationFactor
The number of batches to process from each shard concurrently.Valid Range:
- Minimum value of 1
- Maximum value of 10
Default: 1
-
getReportBatchItemFailures
Allow functions to return partially successful responses for a batch of records.Default: false
- See Also:
-
getRetryAttempts
Maximum number of retry attempts.Set to -1 for infinite retries (until the record expires in the event source).
Valid Range: -1 (infinite) or 0 to 10000
Default: -1 (infinite retries)
-
getTumblingWindow
The size of the tumbling windows to group records sent to DynamoDB or Kinesis Valid Range: 0 - 15 minutes.Default: - None
-
builder
- Returns:
- a
StreamEventSourceProps.BuilderofStreamEventSourceProps
-