DynamoDB流过滤器比较NewImage和OldImage中的值。

0

【以下的问题经过翻译处理】 我有一张名为"MyTable"的表格,其中包含一个"count"(数字)字段。我希望每次表格中任何一项的"count"值更新时,都会触发我的"CountListener"函数。我已经为该表启用了流(新旧图像),现在我需要为流事件编写过滤器,以便仅在"count"发生更改时调用"CountListener"。从文档中,我看到如何编写比较字段值与常量值的过滤器:我想知道是否可以将"NewImage"中的"count"值与"OldImage"中的值进行比较,并仅在它们不同时触发lambda函数。

1 Answer
0

【以下的回答经过翻译处理】 写作本文时,Lambda事件过滤不能实现您的目标,原因有二:1. 没有“数值不等于”运算符;2. 无法比较流数据中的两个字段。

profile picture
EXPERT
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions