AWS Lambda response streaming incremental Amazon DynamoDB Query results

AWS Lambda → Amazon DynamoDB

This pattern uses AWS Lambda response streaming to stream Amazon DynamoDB results in batches, reducing time-to-first-byte (TTFB).

The service interaction in this pattern uses AWS Lambda's response streaming capability to stream data in batches from Amazon DynamoDB. Instead of retrieving all results at once, the Lambda function processes the query incrementally, retrieving and sending results as they become available.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/lambda-streaming-ttfb-write-sam-with-dynamodb

Deploy

sam deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete.

Created by:

Sandeep Kumar P

Sandeep Kumar P

Principal Solutions Architect at AntStack

Follow on LinkedIn