可以触发什么事件来触发DynamoDB中的lambda函数? [英] What event can be triggered to fire a lambda function in DynamoDB?
问题描述
我似乎找不到有关DynamoDB能够基于哪些事件触发lambda函数的文档。我所能找到的只是提及何时将新记录添加到表中或更新记录。这两个唯一动作/事件是否可用?或者,当我请求不存在的记录时(我将使用DynamoDB作为缓存的情况),我是否还可以触发lambda函数?
I can't seem to find the documentation on what kinds of events DynamoDB is able to trigger a lambda function based on. All I can find is mentions of when a new record is added to a table or a record is updated. Are those the two "only" actions/events available? Or could I also trigger a lambda function when I request a records that does not exists (which is what I need in my case, where I will be using DynamoDB as a cache)?
推荐答案
DynamoDB不支持自动触发Lambda函数,因为有人查询了不存在的键。您必须在查询代码中进行处理。
Triggering a Lambda function automatically because somebody queried for a key that doesn't exist is not supported by DynamoDB. You would have to handle that in your querying code.
这篇关于可以触发什么事件来触发DynamoDB中的lambda函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!