亚马逊 SNS 主题 sqs labmda
我已经了解如何将消息发布到 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 技术交流群。

如果您已经设置了 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).