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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南