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 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则