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
Topics:
- Topics are asynchronous.
- When something is added to topic all and only currently listening devices will receive the update.
- There is no queueing.
- No delivery notification for the publisher.
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.
Edit:
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.
Step 1: Dynamo -> lambda1 -> sqs -> topic1 -> remote device
Step 2: remote device(after getting the data) -> topic2(acknowledgement) -> lambda2(delete message from sqs) -> Update DB about action
Does this solution seem reliable?
Edit 2:
Basically I am trying to send all the updates made to a DB to IOT Thing.
Based on answer from @dvd86,
Step 1: DynamoStream -> lambda1 -> sqs -> Thing shadow desired
Step 2: shadow reported updated -> lambda2(delete message from sqs) -> Update DB about action