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 Answer
0
Accepted Answer

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.

answered a year 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