1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
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.
répondu il y a un an
Contenus pertinents
- demandé il y a un an
- demandé il y a 2 jours
- demandé il y a 3 mois
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an
Do I have to specify anything in recipe.json to get AWS_IOT_THING_NAME ?? I am using AWS Java SDK. In component what am I suppose to write to fetch the AWS_IOT_THING_NAME. Is it something like system.getEnvironment(AWS_IOT_THING_NAME) ??
https://docs.aws.amazon.com/greengrass/v2/developerguide/component-environment-variables.html
You don't need to do anything special.
AWS_IOT_THING_NAME
is provided as a regular environment variable.