How can I distinguish incoming data using certificates in AWS IoT Core?

0

Hello,

I am using multiple devices in AWS IoT Core and each device has a unique certificate. How can I distinguish incoming data using these certificates? I want to parse and customize the data between different devices. Which methods can I use and how can I perform this process?

Thank you in advance for your help.

질문됨 일 년 전232회 조회
1개 답변
2
수락된 답변

Hi there!

Once a message is published to AWS IoT Core, there is no metadata in the message itself. One way to accomplish this is to give each unique thing (and the attached certificate) it's own topic structure to publish. For instance, things Foo and Bar could have an IoT policy that allows them to publish on dt/{iot:Connection.Thing.ThingName}/*, where Connection.Thing.ThingName must match thignName (see these examples for why this helps with clientId matching thingName). Then depending upon what will parse and customize you can extract the MQTT topic. With the example above, Foo publishes a message on dt/Foo/telemetry, and any subscribers or the rule engine can then parse the second level of the topic to get the thing name.

If using rules to transform data, use the topic function to obtain the thingName.

Please let me know if this helps!

AWS
Gavin_A
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인