-
What I'm trying to do is to use lifecycle iot rules for identifying whether my device is online/offline. therefore client id must be my-env/thing name e.g. "my-env/thing1" This works just fine, with a wild policy allowing all to connect, but the problem is that I cannot adjust the more restrict connect policy to work that way. Here is the policy with my-env in it
which doesn't work and failing with: 'awscrt.exceptions.AwsCrtError: AWS_ERROR_MQTT_UNEXPECTED_HANGUP: The connection was closed unexpectedly.' If I change it like below and I connect with client id same as thing name, without including my-env e.g. "my-env/thing1", it works, but brakes the lifecycle routing
Could someone please suggest how to resolve this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Ok, the answer was always there in the documentation (and even at the very top of the page)
So I cannot tight everything to the $ThingName and yet concat environment name into the clientid. I guess what I will do is generate a policy for each certificate/thing and then instead of variables use static values (which are known at the time of creating and therefor will fit for the thing) |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Ok, the answer was always there in the documentation (and even at the very top of the page)
So I cannot tight everything to the $ThingName and yet concat environment name into the clientid.
I guess what I will do is generate a policy for each certificate/thing and then instead of variables use static values (which are known at the time of creating and therefor will fit for the thing)