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

preguntada hace 3 años259 visualizaciones
2 Respuestas
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
respondido hace 3 años
0

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

respondido hace 3 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas