Hello,
I am trying out the AWS IoT Core Integration.
I am excited about the device configuration using device shadows, which is a very interesting feature.
After following the tutorial and approving the device, I have confirmed that mender-configure deploys the following contents to the configuration file (/var/lib/mender-configure/device-config.json
).
- awsCertificate
- awsEndpoint
- awsPrivateKey (not available as is, see this article)
To retrieve the device shadow with curl, run the following command.
curl \
--tlsv1.2 \
-X GET \
--cert <awsCertificate> \
--key <awsPrivateKey> \
https://<awsEndpoint>:8443/things/<thingName>/shadow
# https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-rest-api.html#API_GetThingShadow
However, I cannot get the device shadow because there is no thingName
in device-config.json.
Apparently, the thingName is the same as the Device ID used inside the Mender server.
Can anyone tell me how to get the thingName (Device ID) from the device?
I do not want to have Mender credentials on my device, so I wish there was a way to avoid using Mender’s server-side API.
Thanks,