Skip to content

feat(parser): add support for tumbling windows in Kinesis and DynamoDB events #3931

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

kiitosu
Copy link

@kiitosu kiitosu commented May 15, 2025

Summary

Enable TumblingWindow support for KinesisDataStreamRecord and DynamoDB.

Changes

Added properties to support tumbling windows in KinesisStreamEvent and DynamoDBStream Event:

  • window
  • state
  • shard_id
  • event_source_arn
  • is_final_invoke_for_window
  • is_window_terminated_early

Issue number: #3915


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@boring-cyborg boring-cyborg bot added parser This item relates to the Parser Utility tests PRs that add or change tests labels May 15, 2025
Copy link

boring-cyborg bot commented May 15, 2025

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #typescript channel on our Powertools for AWS Lambda Discord: Invite link

@pull-request-size pull-request-size bot added the size/L PRs between 100-499 LOC label May 15, 2025
@kiitosu
Copy link
Author

kiitosu commented May 15, 2025

@leandrodamascena
I just opened a pull request—I’d appreciate it if you could take a look!

@dreamorosi dreamorosi changed the title feat(event_source): add support for tumbling windows in Kinesis and DynamoDB events feat(parser): add support for tumbling windows in Kinesis and DynamoDB events May 15, 2025
@github-actions github-actions bot added feature PRs that introduce new features or minor changes labels May 15, 2025

This comment was marked as off-topic.

@github-actions github-actions bot added do-not-merge This item should not be merged need-issue This PR needs an issue before it can be reviewed/worked on further labels May 15, 2025
@dreamorosi dreamorosi removed do-not-merge This item should not be merged need-issue This PR needs an issue before it can be reviewed/worked on further labels May 15, 2025
@dreamorosi dreamorosi self-requested a review May 15, 2025 13:57
@dreamorosi dreamorosi requested review from am29d and removed request for dreamorosi May 16, 2025 14:49
@dreamorosi
Copy link
Contributor

@kiitosu thank you for the PR, I made some small fixes in the Kinesis schema which was implemented as a type and fixed the indentation of one of the comments. I also adapted the unit tests to be in line with the others.

As soon as another maintainer approves the PR we're good to merge it.

@am29d I had to make a commit to fix the things above, can you pls review and approve when you can? The schemas were tested by Leandro in the same PR but in the Python repo.

Copy link
Contributor

@am29d am29d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor question about example in the docs

Comment on lines -84 to -97
* "kinesis": {
* "kinesisSchemaVersion": "1.0",
* "partitionKey": "1",
* "sequenceNumber": "49590338271490256608559692540925702759324208523137515618",
* "data": "VGhpcyBpcyBvbmx5IGEgdGVzdC4=",
* "approximateArrivalTimestamp": 1545084711.166
* },
* "eventSource": "aws:kinesis",
* "eventVersion": "1.0",
* "eventID": "shardId-000000000006:49590338271490256608559692540925702759324208523137515618",
* "eventName": "aws:kinesis:record",
* "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-role",
* "awsRegion": "us-east-2",
* "eventSourceARN": "arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we remove these fields from the example? Or was it unintentional?

@am29d am29d self-requested a review May 16, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature PRs that introduce new features or minor changes parser This item relates to the Parser Utility size/L PRs between 100-499 LOC tests PRs that add or change tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Enable TumblingWindow support for KinesisDataStreamRecord and DynamoDB
3 participants