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

0

{ "allowProvisioning": "true" }

{ "allowProvisioning": true }

{ allowProvisioning: true }

Iot4Me
asked 7 months ago238 views
2 Answers
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",
        ...
    }
}
answered 7 months ago
  • 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
Accepted Answer

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
answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions