Is there a way to read the group name in a component or environment var?

0

I am using Greengrass V2 and I would like a way to read the current group the device belongs to. I don't need the group hierarchy but that would also be fine. Does anyone know if there is an environment variable for this? I can use the environment variable AWS_IOT_THING_NAME for the device name and I'm hoping there is something for group as well. If there isn't an environment variable is there a component level configuration that can be read, something like '{configuration:/DEPLOYMENT_GROUP}'?

Thanks

已提问 3 年前259 查看次数
2 回答
0

Hi,

This is not currently supported. In the meantime, would you be able to use the ListThingGroupsForThing API to get the group name from the thing name?
https://docs.aws.amazon.com/iot/latest/developerguide/thing-groups.html#list-thing-groups-for-thing

Thanks,
AV

AWS
已回答 3 年前
0

Thanks for the suggestion. I think that will work for me.

已回答 3 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则