How to identify update author in Device Shadow

0

I am facing a problem where I need to somehow include the last update author in the Device Shadow state document. For example, we have a remote console and a device which communicate the device's state through device shadow. On each update to the device shadow I would like to include an author field, to identify whether the console or the device authored the update.

I am interested in adding this author field in the Device Shadow metadata section. However I cannot find any documentation or examples online on customizing the metadata section. Can this be done? If not, what are some other ways I could include the author information in the state document.

已提問 1 年前檢視次數 215 次
1 個回答
0

Hi, the normal use of device shadows is that the device writes the updates in the reported section of the device shadow, while applications write updates in the desired section of the device shadow. If your solution can follow this pattern, eg the console is the application, then you can track if the device or the console updated the shadow document and when. If this pattern cannot be followed, you can add a field in the device shadow reported section to be populated by the writer. Finally, depending on which use you make of this information, all operations on shadow documents are logged in CloudWatch logs together with the information indicating what performed the update.

Cheers,

Massimiliano

AWS
專家
已回答 1 年前

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

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

回答問題指南