Skip to content

Latest commit

 

History

History
49 lines (38 loc) · 1.55 KB

iot-fleet-provisioning.md

File metadata and controls

49 lines (38 loc) · 1.55 KB

IoT Fleet Provisioning

Simple event definition

This will create an IoT Provisioning Template with a pre-provision hook lambda. Both templateBody and provisioningRoleArn are required fields.

functions:
  smartHomeValidation:
    handler: smartHomeValidation.handler
    events:
      - iotFleetProvisioning:
          templateBody: ${file(template.json)}
          provisioningRoleArn: arn:aws:iam::12345678910:role/provisioning-role

Example of template.json file

Enabling / Disabling

Note: IoT templates provisioned via iotFleetProvisioning events are enabled by default.

This will disable the template.

functions:
  smartHomeValidation:
    handler: smartHomeValidation.handler
    events:
      - iotFleetProvisioning:
          templateBody: ${file(template.json)}
          provisioningRoleArn: arn:aws:iam::12345678910:role/provisioning-role
          enabled: false

Specify a template name

Created template name can be enforced using the templateName property.

functions:
  smartHomeValidation:
    handler: smartHomeValidation.handler
    events:
      - iotFleetProvisioning:
          templateName: SmartBulbTemplate
          templateBody: ${file(template.json)}
          provisioningRoleArn: arn:aws:iam::12345678910:role/provisioning-role