MQTT-based file delivery from the thing to AWS Core IOT

0

I'm developing a system based on AWS Core IOT FreeRTOS that is using MQTT and Shadow library to communicate both ways. Is there a way to send a file in the upstream direction, that is from the thing to AWS Core IOT? I see that there is an option to MQTT-based file delivery but I need the other way around.

EyalG
已提問 1 年前檢視次數 382 次
2 個答案
1
已接受的答案

Hi EyalG. There's no equivalent or similar upstream mechanism for MQTT. To do it over MQTT, you would have to break your file into parts of not more than 128KB (current MQTT payload limit) for transport and re-constitute it in the cloud.

One alternative you may consider is to upload to S3 using HTTP: https://aws.amazon.com/blogs/iot/securely-ingesting-large-sized-payloads-from-iot-devices-to-the-aws-cloud/. You can find a similar demo implementation here: https://github.com/aws/aws-iot-device-sdk-embedded-C/blob/main/demos/http/http_demo_s3_upload/http_demo_s3_upload.c

profile pictureAWS
專家
Greg_B
已回答 1 年前
profile picture
專家
已審閱 1 個月前
0

Thank you for the answer. In my case the requested file length is much less then 128K but the only way I know to communicate with the Core is by updating the shadow topic with publish call (MQTTAgent_Publish). How can I send a file with that MQTT interface if its size is less then 128K? Thanks

EyalG
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南