How to retreive GreengrassV2 Core Device's AWS IoT Thing name


When working with already-configured GreengrassV2 core devices (and therefore the associated AWS IoT Thing), how should one go about the local identification of a physical device that's been registered? The Greengrass CLI ( has no method to describe how the local device is registered to the cloud, and the AWS CLI greengrassv2 command does not help identify "which physical device corresponds to the registered core-device".

Consider a scenario where someone has 5 unmarked Raspberry Pi's set up as core devices. Each is registered as a Greengrass core device / IoT Thing. How can one best cross-reference which Raspberry Pi corresponds to which core device definition?

I see in a recent documentation update, that in a component lifecycle script, a number of environment variables are automatically set including AWS_IOT_THING_NAME. However, these don't seem to be available outisde of a lifecycle script. Is there a configuration file that stores that information which could easily be accessed, outside of the context of a lifecycle script? Is there a local utility installed that can print out this information?

I feel like there must be some simple way to SSH into a physical device and quickly identify which IoT Thing it is. Or am I wrong?

preguntada hace 3 años1045 visualizaciones
2 Respuestas
Respuesta aceptada

The correct and the recommended way of knowing the thing name within the Greengrass scope is by using the AWS_IOT_THING_NAME environment variable. However, as you mentioned it already - you can read the effective config file at <greengrass-root>/config/effectiveConfig.yaml to know the thingName under system property outside of Greengrass.


respondido hace 3 años
profile picture
revisado hace 7 días

As a follow-up, I now see that there is an "effective config" file in the Greengrass root directory (/greengrass/v2/config/effectiveConfig.yaml on my system after following the current quick-start installation instructions).

In that YAML file, there is a section system.thingName which shows the currently registered name.

Is this the appropriate place to find this information?

respondido hace 3 años
  • Just wondering if you explored this idea of reading the config file?

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