1 Answer
- Newest
- Most votes
- Most comments
0
Great feedback but currently this is not possible as documented here
Depending on your use case, you could use the following approach:
- Create a provisioning template where the IoT policy can be passed as a parameter and reference this policy name parameter in
PolicyName
- If the pre-provision hook lambda denies provisioning, return
"allowProvisioning" : "true"
but pass a policy name in theparameterOverrides
section that denies connectivity to AWS IoT. The Thing and certs will be created but the attached policy will deny any connection attempt. - Use the
DeviceConfiguration
section of the template to return info about the reason why the provisioning failed.
Hope that helps and if my answer was useful, please consider up-voting or accepting my answer. Thx!
Relevant content
- Accepted Answerasked 4 years ago
- asked a year ago
- asked 4 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago