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

aws-lambda-event-sources: KafkaEventSourceProps does not support startingPosition AT_TIMESTAMP correctly? #32235

Open
1 task
justin-masse opened this issue Nov 21, 2024 · 1 comment
Assignees
Labels
@aws-cdk/aws-lambda-event-sources bug This issue is a bug. p3 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@justin-masse
Copy link

Describe the bug

Getting a synth error: Error: startingPositionTimestamp must be provided when startingPosition is AT_TIMESTAMP when instantiating SelfManagedKafkaEventSource() with startingPosition: StartingPosition.AT_TIMESTAMP

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

KafkaEventSourceProps chain of inheritance should allow for passing in startingPositionTimestamp

Current Behavior

You cannot provide startingPositionTimestamp anywhere on that constructor prop... if you do it will error and even if you do something like ts-ignore-error it will give you an error when running synth:

Error: startingPositionTimestamp must be provided when startingPosition is AT_TIMESTAMP

Reproduction Steps

Instantiate SelfManagedKafkaEventSource() and in the props provide startingPosition: StartingPosition.AT_TIMESTAMP, which appears to be a valid option based on the types. This will cause an error when running synth... and you cannot provide required startingPositionTimestamp as it is not on the interfaces.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.142.1

Framework Version

No response

Node.js Version

20

OS

macos

Language

TypeScript

Language Version

5.4

Other information

using latest aws-cdk-lib version

@justin-masse justin-masse added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 21, 2024
@ashishdhingra ashishdhingra self-assigned this Nov 21, 2024
@ashishdhingra ashishdhingra added investigating This issue is being investigated and/or work is in progress to resolve the issue. p3 and removed needs-triage This issue or PR still needs to be triaged. labels Nov 21, 2024
@ashishdhingra
Copy link
Contributor

@justin-masse Good afternoon. Thanks for opening the issue. If you refer the documentation for StartingPosition.AT_TIMESTAMP, it is only supported for Amazon Kinesis streams. Based on this limitation, if you refer documentation for KinesisEventSource > KinesisEventSourceProps, it does support startingPositionTimestamp property.

Thanks,
Ashish

@ashishdhingra ashishdhingra added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda-event-sources bug This issue is a bug. p3 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants