Please tell me how to get the Thing name of the core device itself on an IoT Greengrass core device
The issue
I am developing using IoT Greengrass.
In the program I am developing, I want to retrieve the Thing name of the Greengrass core device itself and perform processing according to the core device name, but I don't know how to get the Thing name of the core device itself.
Please tell me how to get the Thing name of the core device itself on an IoT Greengrass core device.
The solution
You can get the Thing name of the core device itself by using the environment variable AWS_IOT_THING_NAME from a Greengrass component.
Component environment variable reference - AWS IoT Greengrass
AWS_IOT_THING_NAME
The name of the AWS IoT thing that represents this Greengrass core device.
Please consider retrieving the Thing name of the core device itself from AWS_IOT_THING_NAME in your program, referring to the above AWS official documentation.









