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

Interaction between AWS IoT Button and IoT devices


We have learned how to communicate with AWS IoT Button. In this section, we will continue developing the IoT application to enable interaction between IoT devices and AWS IoT Button. Our scenario is to apply Raspberry Pi 3 with the attached LED. When AWS IoT Button is clicked, the LED will be lit. Otherwise, the LED will be turned off if AWS IoT Button is double clicked. You can see this scenario in the following image:

To enable accessing AWS IoT from Raspberry Pi 3, you should register it to obtain a certificate, private, and public keys files. We will use them to access the AWS IoT server. We use the same wiring from  Chapter 4, Building Local AWS Lambda with AWS Greengrass. We attach the LED on GPIO 18 (pin 12), as seen in the following image:

For program implementation, we use the Node.js platform. We should install AWS IoT SDK for Node.js. We also need the rpio library to access GPIO that we learned in Chapter 4Building Local AWS...