Book Image

Learning AWS IoT

By : Agus Kurniawan
Book Image

Learning AWS IoT

By: Agus Kurniawan

Overview of this book

The Internet of Things market increased a lot in the past few years and IoT development and its adoption have showed an upward trend. Analysis and predictions say that Enterprise IoT platforms are the future of IoT. AWS IoT is currently leading the market with its wide range of device support SDKs and versatile management console. This book initially introduces you to the IoT platforms, and how it makes our IoT development easy. It then covers the complete AWS IoT Suite and how it can be used to develop secure communication between internet-connected things such as sensors, actuators, embedded devices, smart applications, and so on. The book also covers the various modules of AWS: AWS Greengrass, AWS device SDKs, AWS IoT Platform, AWS Button, AWS Management consoles, AWS-related CLI, and API references, all with practical use cases. Near the end, the book supplies security-related best practices to make bi-directional communication more secure. When you've finished this book, you'll be up-and-running with the AWS IoT Suite, and building IoT projects.
Table of Contents (14 chapters)
Title Page
Packt Upsell
Contributors
Preface
Index

Setting up the development environment


After we have registered all the IoT devices for AWS IoT, we can set up our development environment. Depending on your kind of IoT device, you can install AWS IoT SDK for your device. You can review the details at https://aws.amazon.com/iot/sdk/.

For testing, we use a computer that acts as an IoT thing. The computer will access AWS IoT. To simplify our case, I use JavaScript SDK for AWS IoT, available at https://github.com/aws/aws-iot-device-sdk-js. Since JavaScript SDK for AWS IoT needs Node.js to run the program, your computer should install Node.js runtime. You can download and install Node.js for your platform from https://nodejs.org/.

To install AWS IoT SDK for JavaScript, do so through the npm package. You should install Node.js runtime for your platform. You can type the following command to install AWS IoT SDK for JavaScript:

$ npm install aws-iot-device-sdk

You can probably run this command at an administrator level if you get an error message due to a security issue.

For the development tool, you can use any text editor to write JavaScript scripts. For instance, you can use Visual Studio Code at https://code.visualstudio.com. You can see my sample JavaScript scripts on Visual Studio Code IDE  in the following screenshot: