如何订阅DynamoDB中的更改 [英] How to subscribe to changes in DynamoDB

本文介绍了如何订阅DynamoDB中的更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道如何订阅DynamoDB数据库中的更改。让我举一个例子:用户A向用户B发送一条消息(保存在数据库中),然后在用户B的应用程序中自动出现该消息。

I don't know how to subscribe to changes in DynamoDB database. Let me show an example: User A sends a message (which is saved in the database) to User B and in the User B's app the message automatically appears.

我知道最近发布的AWS AppSync可以做到这一点,但是我无法将其与Ionic(正在使用)集成。但是,自从AWS AppSync仅在2017年底/ 2018年初发布以来,就必须有其他选择。

I know this is possible with recently released AWS AppSync, but I couldn't integrate it with Ionic (which I am using). However, there must be an alternative since AWS AppSync was released only at the end of 2017/beginning of 2018.

我还在DynamoDB中看到过一种称为Streams的东西,但没有

I've also seen something called Streams in DynamoDB but not sure if that's what I need.

推荐答案

DynamoDB流专为捕获/预订表活动而设计。您可以使用通知逻辑设置Lambda函数来处理流并相应地发送通知。

DynamoDB Streams is designed specifically for capturing/subscribing to table activity. You can set up a Lambda Function with your notification logic to process the stream and send notifications accordingly.

这篇关于如何订阅DynamoDB中的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆