AWS IoT Device SDK C: Fleet Provisioning
AWS IoT Fleet Provisioning
Return to main page ↑
Design

Provisioning library architecture.

The Provisioning library uses MQTT publish/subscribe to interact with the AWS IoT Core service for the Fleet Provisioning feature. Each library operation ("CreateKeysAndCertificate", "CreateCertificateFromCsr", "RegisterThing") uses two MQTT subscriptions, one for the "accepted" topic and one for the "rejected" topic, to obtain the responses from AWS IoT Core, and publishes to the MQTT request topic of the operation. Each operation also requires a user-callback for handling the server response. The callbacks will run in the system taskpool context.

High Level Design of a Provisioning Operation

The following shows a high-level workflow of each library operation. The library uses the MQTT stack for communicating with AWS IoT and the serializer stack for serializing and de-serializing request and responses, respectively, from the server.

provisioning_operation_highlevel_design.png

Detailed Workflow Diagram of a Provisioning Operation

The following shows the detailed workflow of each Provisioning operation. The Provisioning library architecture consists of 3 layers: API, serializer and parser, all of which are used for each Provisioning operation. The library uses an internal global state memory, separate for each operation type, that is shared between the Provisioning API and MQTT subscription callback layers. The global state represents the state of the operation and provides a synchronization mechanism between the Provisioning API and MQTT subscription callback layers.

provisioning_operation_detailed_design.png