Closed supergillis closed 3 weeks ago
Hi, Thank you for using the component and bringing this to our attention again.
The policy variable iot:Connection.Thing.ThingName
is available only when a device connects over MQTT or MQTT over the WebSocket protocol as mentioned in the documentation here. But, the Shadow manager component uses HTTP requests for making IoT Data Plane operations for shadows. So, IoT policy variables are not interpolated as expected in this case and this is also called out in the documentation here.
We'll add this to our backlog as a possible enhancement and look into this further.
Describe the bug The
IotDataPlaneClientFactory
is not passing the thing name asx-amzn-iot-thingname
HTTP header. This prevents us from using IoT Core Policy variables likeiot:Connection.Thing.ThingName
.To Reproduce Use
${iot:Connection.Thing.ThingName}
in the IoT Core Policy foriot:*ThingShadow
.Expected behavior The AWS IoT Core policy using the policy variable
iot:Connection.Thing.ThingName
should work.Actual behavior Synchronizing shadows with the shadow manager does not work. You have to set
Resource
to*
for it to work.