-
Notifications
You must be signed in to change notification settings - Fork 429
feat(event_source): add support for tumbling windows in Kinesis and DynamoDB events #6658
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
Merged
leandrodamascena
merged 23 commits into
aws-powertools:develop
from
kiitosu:feature/add_data_for_tumbling_window
May 14, 2025
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
5236155
add data for tumbling window
kiitosu 8b79b7b
add unit test
kiitosu 81e8dfb
Update aws_lambda_powertools/utilities/data_classes/kinesis_stream_ev…
kiitosu 39c1fda
Update aws_lambda_powertools/utilities/data_classes/kinesis_stream_ev…
kiitosu 32fc93b
Update aws_lambda_powertools/utilities/data_classes/kinesis_stream_ev…
kiitosu a7ea3e3
Update aws_lambda_powertools/utilities/data_classes/kinesis_stream_ev…
kiitosu bff39f0
Update aws_lambda_powertools/utilities/data_classes/kinesis_stream_ev…
kiitosu 523435c
Update aws_lambda_powertools/utilities/data_classes/kinesis_stream_ev…
kiitosu 95809ff
Update aws_lambda_powertools/utilities/data_classes/kinesis_stream_ev…
kiitosu af4c5e9
Update aws_lambda_powertools/utilities/data_classes/kinesis_stream_ev…
kiitosu 066cb2f
Update aws_lambda_powertools/utilities/data_classes/kinesis_stream_ev…
kiitosu ac03550
Update aws_lambda_powertools/utilities/data_classes/kinesis_stream_ev…
kiitosu 44589bb
Update aws_lambda_powertools/utilities/data_classes/kinesis_stream_ev…
kiitosu eb4bef7
Update aws_lambda_powertools/utilities/data_classes/kinesis_stream_ev…
kiitosu c997c9b
Merge branch 'aws-powertools:develop' into feature/add_data_for_tumbl…
kiitosu 3f07f43
fix window function
kiitosu a0adaee
add test test_kinesis_stream_with_tumbling_window_event
kiitosu b018614
add properties for tumbling window to dynamodb stream
kiitosu 41adc0b
Update aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_…
kiitosu 58ab8f1
Update aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_…
kiitosu d092a9e
Update aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_…
kiitosu fb77d5c
Converage
leandrodamascena f2406a1
Merge branch 'develop' into feature/add_data_for_tumbling_window
leandrodamascena File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
{ | ||
"Records": [ | ||
{ | ||
"eventID": "1", | ||
"eventName": "INSERT", | ||
"eventVersion": "1.0", | ||
"eventSource": "aws:dynamodb", | ||
"awsRegion": "us-east-1", | ||
"dynamodb": { | ||
"Keys": { | ||
"Id": { | ||
"N": "101" | ||
} | ||
}, | ||
"NewImage": { | ||
"Message": { | ||
"S": "New item!" | ||
}, | ||
"Id": { | ||
"N": "101" | ||
} | ||
}, | ||
"SequenceNumber": "111", | ||
"SizeBytes": 26, | ||
"StreamViewType": "NEW_AND_OLD_IMAGES" | ||
}, | ||
"eventSourceARN": "stream-ARN" | ||
}, | ||
{ | ||
"eventID": "2", | ||
"eventName": "MODIFY", | ||
"eventVersion": "1.0", | ||
"eventSource": "aws:dynamodb", | ||
"awsRegion": "us-east-1", | ||
"dynamodb": { | ||
"Keys": { | ||
"Id": { | ||
"N": "101" | ||
} | ||
}, | ||
"NewImage": { | ||
"Message": { | ||
"S": "This item has changed" | ||
}, | ||
"Id": { | ||
"N": "101" | ||
} | ||
}, | ||
"OldImage": { | ||
"Message": { | ||
"S": "New item!" | ||
}, | ||
"Id": { | ||
"N": "101" | ||
} | ||
}, | ||
"SequenceNumber": "222", | ||
"SizeBytes": 59, | ||
"StreamViewType": "NEW_AND_OLD_IMAGES" | ||
}, | ||
"eventSourceARN": "stream-ARN" | ||
}, | ||
{ | ||
"eventID": "3", | ||
"eventName": "REMOVE", | ||
"eventVersion": "1.0", | ||
"eventSource": "aws:dynamodb", | ||
"awsRegion": "us-east-1", | ||
"dynamodb": { | ||
"Keys": { | ||
"Id": { | ||
"N": "101" | ||
} | ||
}, | ||
"OldImage": { | ||
"Message": { | ||
"S": "This item has changed" | ||
}, | ||
"Id": { | ||
"N": "101" | ||
} | ||
}, | ||
"SequenceNumber": "333", | ||
"SizeBytes": 38, | ||
"StreamViewType": "NEW_AND_OLD_IMAGES" | ||
}, | ||
"eventSourceARN": "stream-ARN" | ||
} | ||
], | ||
"window": { | ||
"start": "2020-07-30T17:00:00Z", | ||
"end": "2020-07-30T17:05:00Z" | ||
}, | ||
"state": { | ||
"1": "state1" | ||
}, | ||
"shardId": "shard123456789", | ||
"eventSourceARN": "stream-ARN", | ||
"isFinalInvokeForWindow": false, | ||
"isWindowTerminatedEarly": false | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
{ | ||
"Records": [ | ||
{ | ||
"kinesis": { | ||
"kinesisSchemaVersion": "1.0", | ||
"partitionKey": "1", | ||
"sequenceNumber": "49590338271490256608559692538361571095921575989136588898", | ||
"data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0Lg==", | ||
"approximateArrivalTimestamp": 1607497475.000 | ||
}, | ||
"eventSource": "aws:kinesis", | ||
"eventVersion": "1.0", | ||
"eventID": "shardId-000000000006:49590338271490256608559692538361571095921575989136588898", | ||
"eventName": "aws:kinesis:record", | ||
"invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-kinesis-role", | ||
"awsRegion": "us-east-1", | ||
"eventSourceARN": "arn:aws:kinesis:us-east-1:123456789012:stream/lambda-stream" | ||
} | ||
], | ||
"window": { | ||
"start": "2020-12-09T07:04:00Z", | ||
"end": "2020-12-09T07:06:00Z" | ||
}, | ||
"state": { | ||
"1": 282, | ||
"2": 715 | ||
}, | ||
"shardId": "shardId-000000000006", | ||
"eventSourceARN": "arn:aws:kinesis:us-east-1:123456789012:stream/lambda-stream", | ||
"isFinalInvokeForWindow": false, | ||
"isWindowTerminatedEarly": false | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.