将数据从云发送到AWS物联网 [英] Send data from cloud to aws iot thing

查看:138
本文介绍了将数据从云发送到AWS物联网的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试一种可靠的方法来将数据从AWS Lambda函数发送到AWS IOT事物.基本上,这是一个位于远程的树莓派.

I am trying to a reliable way to send data from aws lambda function to a aws iot thing. The thing is basically a raspberry pi which is located remotely.

我见过很多关于物联网的话题,但是对于我的用例来说,它们似乎并不可靠.

I have seen aws iot topics, but they don't seem to be reliable for my use case.

到目前为止,我发现了有关主题的以下功能

So far I have found the following functionalities about topics

主题:

  • 主题是异步的.
  • 将所有内容添加到主题后,只有当前正在收听的设备才能收到更新.
  • 没有排队.
  • 没有发布商的送达通知.

在我的用例中,我需要知道是否已完成传递(否则请重试),但是如果未连接设备,则该主题可能会丢失写入.

In my use case I need to know if the delivery is made(retry otherwise), but if the device is not connected, the topic might lose the write.

是否有解决此问题的方法.非常感谢您的帮助.

Is there a way to solve this issue. Any help is much appreciated.

我想做的是发送有关可以从远程服务器与设备进行交互的用户的数据.

What I am trying to do is send data about a user who can interact with the device from a remote server.

为了克服用例的主题限制,我想出了以下解决方案.

To over come the limitation of topic for my use case I came up with the following solution.

第1步:Dynamo-> lambda1-> sqs-> topic1->远程设备

Step 1: Dynamo -> lambda1 -> sqs -> topic1 -> remote device

第2步:远程设备(获取数据后)-> topic2(确认)-> lambda2(从sqs删除消息)->更新有关操作的数据库

Step 2: remote device(after getting the data) -> topic2(acknowledgement) -> lambda2(delete message from sqs) -> Update DB about action

此解决方案似乎可靠吗?

Does this solution seem reliable?

基本上,我试图将对数据库所做的所有更新发送到IOT Thing.

Basically I am trying to send all the updates made to a DB to IOT Thing.

基于@ dvd86的答案,

Based on answer from @dvd86,

第1步:DynamoStream-> lambda1-> sqs->需要阴影

Step 1: DynamoStream -> lambda1 -> sqs -> Thing shadow desired

第2步:影子报告已更新-> lambda2(从sqs删除消息)->更新有关操作的数据库

Step 2: shadow reported updated -> lambda2(delete message from sqs) -> Update DB about action

推荐答案

不建议使用您的解决方案,因为要实现自己的许多麻烦,因为AWS物联网已经实现了.

Your solution is not recommend because there is a lot of troubles that you are going to have to implement yourself that Aws iot already implemented.

您对此情况的答案是使用AWS IoT阴影:

Your answer for this scenario is using AWS IoT shadow: https://docs.aws.amazon.com/iot/latest/developerguide/using-thing-shadows.html

这篇关于将数据从云发送到AWS物联网的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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