-
Notifications
You must be signed in to change notification settings - Fork 1k
New serverless pattern - Lambda response streaming from DynamoDB #2481
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
Conversation
ellisms
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your submission @sandykumar93 . Requesting a few minor edits.
lambda-streaming-ttfb-write-sam-with-dynamodb/example-pattern.json
Outdated
Show resolved
Hide resolved
lambda-streaming-ttfb-write-sam-with-dynamodb/example-pattern.json
Outdated
Show resolved
Hide resolved
|
@ellisms thank you for taking the time to review and provide suggestions. I have applied all the suggestions in the latest commit. I have resolved all the comments except the one for data population. Please have a look when possible and let me know if any other changes are required. |
ellisms
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one last edit.
Co-authored-by: ellisms <114107920+ellisms@users.noreply.github.com>
|
Thanks, adding to the publishing queue. |
Issue #2482
Description of changes:
The newly added pattern shows how to use Lambda response streaming to incrementally retrieve and stream DynamoDB query / scan results using the write() method. Instead of waiting for the entire query / scan operation to complete, the Lambda function streams data in batches by setting a limit on the number of items per query and sending each batch as soon as it's retrieved. This improves the time-to-first-byte (TTFB) by streaming results to the client as they become available.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.