亚马逊 SNS 主题 sqs labmda

发布于 01-15 03:16 字数 167 浏览 2 评论 0原文

我已经了解如何将消息发布到 SNS 主题并订阅移动通知。

但我也希望每条消息都保存到数据库中。 我怎样才能做到这一点?

因为我知道您也可以订阅 sqs 队列同一主题。 但我不仅想保存消息,还想保存接收消息的人。

请问有人可以帮我做什么是合乎逻辑的吗?

谢谢! :)

I already find out how to publish message to SNS topic and subscription are mobile notification.

But I also want every message save to a database.
How could I do this with?

Because I know that you can subscribe sqs queue also to the same topic.
But I don't only want save the message, but also who receive the message.

Please could anyone help me what is logical to do?

Thanks! :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夜访吸血鬼2025-01-22 03:16:00

如果您已经设置了 SNS 主题,则可以设置 Lambda 函数作为其触发器。 SNS 到 Lambda教程

然后可以设置此 lambda相对容易地将数据发布到 dynamodb 表 Lambda to迪纳摩。这样,您就不必设置任何 SQS 队列,并且可以在将数据发送到 Dynamo(如果需要)之前使用 Lambda 来格式化和组织数据。

输入图片此处描述

If you already have an SNS topic set up you could set up a Lambda Function as a trigger for it. SNS to Lambda. Tutorial

This lambda could then be set up relatively easily to post data to a dynamodb table Lambda to Dynamo. This way you wont have to set up any SQS Queues and the Lambda can be used to format and organize the data before it gets sent to Dynamo (if needed).

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文