在Lambda IoT MQTT处理程序中获取物联网设备ID(ARN)

0

【以下的问题经过翻译处理】 Lambda操作是否可以获取Thing ID(其ARN或某种唯一标识符)?如果使用基本摄取方式和不使用有何区别?我在提问之前搜索了论坛,我找到的一个线索是:

https://repost.aws/questions/QUT4KAUvqKQOS0v2Abgpxt-g/aws-io-t-thing-connected-event-find-the-thing-name-from-event

该线索指出,我可以更改角色以包括:

        "Resource": [
          "arn:aws:iot:us-east-1:123456789012:client/${iot:Connection.Thing.ThingName}"
        ]

如果我理解得正确,我可以强制设备设置其MQTT客户端ID与其ThingName相同,并在SELECT中包括clientId()来使用它。那是最简单的方法吗?

--C

profile picture
EXPERT
asked 6 months ago35 views
1 Answer
0

【以下的回答经过翻译处理】 我重新阅读了之前类似的帖子,我认为这是最好的方式...所以我将关闭这个。

profile picture
EXPERT
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions