Peiyao Zhou
Peiyao Zhou

Reputation: 31

Can Dynamodb check the items regularly?

Can Dynamodb check the items regularly instead of use a schedule cloudwatch event to trigger a lambda to scan the table? Or to say does Dynamodb has any functions so it can check the table itself for example is the item in "count" column is bigger than 5 and trigger a lambda?

Upvotes: 1

Views: 112

Answers (1)

Gustavo Tavares
Gustavo Tavares

Reputation: 2805

The short answer is no!

DynamoDB is a database. It stores data. At this date it does not have embedded functions like store procedures or triggers that are common in relational databases. You can however use DynamoDB streams to implement a kind of a trigger.

DynamoDB streams could be used to start a lambda function with the old data, new data or the old and the new data of the item updated/created in a table. You can then use the lambda to check for your count column and if it is greater than 5 call another lambda or do the procedure that you need.

Upvotes: 1

Related Questions