MQTT Communication # Greengrass V2

0

Hi Team,

Is it possible to respond to same device who has send message to IoT Core in Greengrass v2 ??

My scenario is I am sending one message on AWS IoT Core and that message has been routed via rules to make a call to Lambda. I have some logical implementation in lambda which would return pre-signed URL which I want to send back to same thing/device who has sent message to IoT Core. Since, I have multiple devices/things, I don't want that message should be accept by other devices.

Is there any provision to handle such scenario ??

1 Resposta
0
Resposta aceita

You should be able to get a thing name from an env variable AWS_IOT_THING_NAME inside a GGv2 component and construct a topic which looks something like this AWS_IOT_THING_NAME/message/response where you can send the back the info to. You will also have the info from which topic the message got received into in a lambda function payload, thus you can know where to send it back.

respondido há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas