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

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ