OTA update using AWS jobs


I know that MOS uses AWS shadow documents for OTA update triggers; however, AWS itself recommends using ‘jobs’ for device OTA updates [ https://docs.aws.amazon.com/iot/latest/developerguide/iot-jobs.html#jobs-devices] and the device needs to listen to either $aws/things/XXX/jobs/notify or $aws/things/XXX/jobs/notify-next to fire off the OTA. I didn’t find any mention of AWS ‘jobs’ for OTA updates nor any info on how to subscribe to those two AWS topics (just /pub and /sub) …

Any thoughts on how to use AWS ‘jobs’ for OTA updates? Thx!


@tyrelle did you find any info about how do MQTT publish and subscribe in Mongoose OS?


@cpq, I’m using aws core iot for publish and subscribe. I havnt tried publishing to mqqt server alone. I do however belive you could do it via the mdash platform.


mDash and AWS IoT are separate IoT backends which talk MQTT.

Your question, and my answer, was about AWS - mDash is completely irrelevant here.

To solve your issue, you must find out how to MQTT publish/subscribe on a device side.


hi @cpq, sorry for not understanding.

For AWS, im using the standard demo js example to connect to AWS. I do connect to AWS and i can send and receive messages. It listens and publishes to the AWS update queue. I can do an OTA if i modify the message on the update queue and i see on the logs that it is received.
The problem comes in is when i create an AWS IOT job to update via OTA. The job stays in queue state. From the docs i read it says that AWS publishes to the notify queue. My question is how do i read that queue. Is it standard on Mongoose OS or do i need to add some code to it.


You need to add code to watch MQTT topics related to AWS jobs and act accordingly.
Mongoose OS has integration for the shadow functionality, but not for jobs, thus you need to handle jobs on your own.

Hope that clarifies.