2
votes

I'm in the process of writing a Lambda function that processes events from a DynamoDB stream.

This page on DynamoDB Streams and AWS Lambda Triggers says:

AWS Lambda polls the stream and invokes your Lambda function synchronously when it detects new stream records.

Why synchronously rather than asynchronously?

In particular, what happens to the output of a Lambda function that's processing DynamoDB stream events? Is it just discarded, or does something actually consume this value?

1

1 Answers

0
votes

Why synchronously rather than asynchronously?

Because it needs to wait until new stream records are done with being written to DynamoDB and then invoke the Lambda. That's why it is synchronously.

In particular, what happens to the output of a Lambda function that's processing DynamoDB stream events? Is it just discarded, or does something actually consume this value?

Depends on what your Lambda does, the output may be stored in S3 or passed to another Lamdba as input or used by other service.