Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lambda-event-sources): unsupported property onFailure for KafkaEventSources #19995

Merged
merged 2 commits into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions allowed-breaking-changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
22 changes: 11 additions & 11 deletions packages/@aws-cdk/aws-lambda-event-sources/lib/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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{
/**
Expand All @@ -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.
*/
Expand All @@ -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 {
/**
Expand Down Expand Up @@ -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;
}

/**
Expand Down