Joey Yi Zhao
Joey Yi Zhao

Reputation: 42474

How can I increase the frequency that a lambda pull dynamodb stream?

My lambda is triggered by a dynamodb table stream. Based on the doc: https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html, Lambda polls shards in your DynamoDB stream for records at a base rate of 4 times per second. When records are available, Lambda invokes your function and waits for the result. If processing succeeds, Lambda resumes polling until it receives more records.

This means I will get about 250 millionseconds latency to trigger my lambda when there is an update happens on dynamodb. Is there a way to improve this pull rate?

Upvotes: 0

Views: 998

Answers (1)

Robert Kossendey
Robert Kossendey

Reputation: 6998

You can not change the polling interval, you can only change things like the batch size or the parallelization factor.

Here you can look up the possibilities of configuration, when invoking a lambda through DynamoDBStreams:

https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-function-dynamodb.html

Upvotes: 0

Related Questions