且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

适用于AWS DynamoDB流的挂钩

更新时间:2023-12-03 10:33:40

我不确定该npm软件包的用途是什么,您可以将事件触发的Lambda与DynamoDB流一起使用。基本上,Lambda服务(而非您的单个羔羊)将轮询Stream以查找更改,并在找到它们时执行您的羔羊。比使用基于某种荒谬的计时器的废话要干净得多。 此处是文档。

I'm not sure what the purpose of that npm package is, you can just use an event triggered Lambda with DynamoDB Streams. Basically, the Lambda service (not your individual lamb) will poll the Stream for changes and execute your lamb when it finds them. Much cleaner than using some kind of ridiculous timer based nonsense. Here are the docs on it.


Amazon DynamoDB与AWS Lambda集成在一起,因此您可以创建触发器,即自动响应DynamoDB Streams中事件的代码段。使用触发器,您可以构建对DynamoDB表中的数据修改做出反应的应用程序。

Amazon DynamoDB is integrated with AWS Lambda so that you can create triggers—pieces of code that automatically respond to events in DynamoDB Streams. With triggers, you can build applications that react to data modifications in DynamoDB tables.

如果在表上启用DynamoDB流,则可以将流ARN与Lambda函数相关联。你写的修改表格中的项目后,表格流中会立即出现一条新记录。 AWS Lambda轮询流并在检测到新的流记录时同步调用Lambda函数。

If you enable DynamoDB Streams on a table, you can associate the stream ARN with a Lambda function that you write. Immediately after an item in the table is modified, a new record appears in the table's stream. AWS Lambda polls the stream and invokes your Lambda function synchronously when it detects new stream records.