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...