1回答
- 新しい順
- 投票が多い順
- コメントが多い順
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.
回答済み 1年前
関連するコンテンツ
- AWS公式更新しました 1年前
- AWS公式更新しました 1年前
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.