diff --git a/allowed-breaking-changes.txt b/allowed-breaking-changes.txt index 6069472407d94..e091ccf78dfa9 100644 --- a/allowed-breaking-changes.txt +++ b/allowed-breaking-changes.txt @@ -130,3 +130,9 @@ removed:@aws-cdk/aws-s3.BucketProps.eventBridgeEnabled # changed the type of RDS's SnapshotCredentials.secret from Secret to ISecret, # shouldn't matter changed-type:@aws-cdk/aws-rds.SnapshotCredentials.secret + +# removed property from kafka eventsources as they are not supported +removed:@aws-cdk/aws-lambda-event-sources.BaseStreamEventSourceProps.onFailure +removed:@aws-cdk/aws-lambda-event-sources.KafkaEventSourceProps.onFailure +removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.onFailure +removed:@aws-cdk/aws-lambda-event-sources.SelfManagedKafkaEventSourceProps.onFailure \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-event-sources/lib/stream.ts b/packages/@aws-cdk/aws-lambda-event-sources/lib/stream.ts index 462387397b629..e8f7f2a40de3e 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/lib/stream.ts +++ b/packages/@aws-cdk/aws-lambda-event-sources/lib/stream.ts @@ -2,8 +2,8 @@ import * as lambda from '@aws-cdk/aws-lambda'; import { Duration } from '@aws-cdk/core'; /** - * The set of properties for event sources that follow the streaming model, - * such as, Dynamo, Kinesis and Kafka. + * The set of properties for streaming event sources shared by + * Dynamo, Kinesis and Kafka. */ export interface BaseStreamEventSourceProps{ /** @@ -21,13 +21,6 @@ export interface BaseStreamEventSourceProps{ */ readonly batchSize?: number; - /** - * An Amazon SQS queue or Amazon SNS topic destination for discarded records. - * - * @default discarded records are ignored - */ - readonly onFailure?: lambda.IEventSourceDlq; - /** * Where to begin consuming the stream. */ @@ -50,8 +43,8 @@ export interface BaseStreamEventSourceProps{ } /** - * The set of properties for event sources that follow the streaming model, - * such as, Dynamo, Kinesis. + * The set of properties for streaming event sources shared by + * Dynamo and Kinesis. */ export interface StreamEventSourceProps extends BaseStreamEventSourceProps { /** @@ -107,6 +100,13 @@ export interface StreamEventSourceProps extends BaseStreamEventSourceProps { * @default - None */ readonly tumblingWindow?: Duration; + + /** + * An Amazon SQS queue or Amazon SNS topic destination for discarded records. + * + * @default - discarded records are ignored + */ + readonly onFailure?: lambda.IEventSourceDlq; } /**