Which is the correct IoT pre-provisioning hook Lambda response to RegisterThing (MQTT)?

0

{ "allowProvisioning": "true" }

{ "allowProvisioning": true }

{ allowProvisioning: true }

Iot4Me
已提問 8 個月前檢視次數 250 次
2 個答案
1

Hi, I found this document that might help you.

Pre-provision hook return value

The Lambda function must return a response that indicates whether it has authorized the provisioning request and the values of any properties to override.

The following is an example of a successful response from the pre-provisioning function.

{
    "allowProvisioning": true,
    "parameterOverrides" : {
        "Key": "newCustomValue",
        ...
    }
}
已回答 8 個月前
  • Yes, but then, below, the JavaScript and Python examples there each show something different. And I even thought I saw "allowProvisioning": "true" on a different website. Do you have experience using pre-provisioning hook Lambdas?

0
已接受的答案

I tested each of them in a JavaScript-based Lambda and they worked. This also worked:

{ "allowProvisioning": 1 }

My results may be language-dependent.

Iot4Me
已回答 8 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南