Skip to content

aws-iot-builder-tools/iot-config-management-sample

IoT Configuration Management Workflow Sample

This project is part of a blog post.

How it works

The diagram below describes how the solution works. More details in the blog post linked above.

Running the demo

Pre-requisites:

To create the resources and run the application, follow the following steps:

  • Clone the GitHub repo.

  • In the root directory, iot-config-management-sample, run the following commands: sam build

    sam deploy --guided

  • Start the device simulator:

    • Add and validate your configuration in iot-config-management-sample/device/config.js: export const config = { iotEndpoint: '<YOUR IoT Endpoint>', clientId: '<YOUR Thing Name>', policyName: '<YOUR IoT Policy>', verbosity: 'warn', region: '<YOUR AWS Region>', shouldCreateThingAndIdentity: <true or false> // if true, the simulator will create the AWS IoT Thing and unique identity. Certificate and Key will be stored in certs/ }

If your shouldCreateThingAndIdentity flag is set to false, you need to make sure the IoT thing, certificate and key have already been created, and store the certificate and key in the certs folder prior to running the mqtt client.

  • Start the simulator: npm install simulator.js

    node simulator.js

  • If the simulator is successfully started, you should already see that an AWS Step Functions workflow was triggered automatically, once your device successfully connected to AWS IoT. Note that the simulator implements a delay of 10 seconds between receiving the request and sending a successful response.

  • Verify that the workflow was successfully triggered:

    • Log into the AWS Console, navigate to AWS Step Functions, find the ConfigManagement State Machine, and explore the execution, as shown in the images below.

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

About

Applying configuration settings to IoT devices automatically once they come online, using AWS IoT, AWS Step Functions and more.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published