Laurence Gonsalves
Laurence Gonsalves

Reputation: 143154

What is done with the output of an AWS Lambda function that's triggered by a DynamoDB stream?

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?

Upvotes: 2

Views: 390

Answers (1)

codigube
codigube

Reputation: 1256

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.

Upvotes: 0

Related Questions