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

Building IoT projects with AWS Lambda and AWS Greengrass


Integrating AWS Lambda and AWS Greengrass can leverage your IoT business. In this section, we will explore IoT projects to implement AWS Lambda and AWS Greengrass. We will build a simple app to monitor a local resource, such as a sensor.

Accessing local resources

AWS Greengrass can access local resources. This is possible if we use AWS Greengrass version 1.3.0 or later versions. You can configure an AWS Lambda to access specific resources. The following is a list of local resources that you can apply:

  • Folders and files
  • Serial ports
  • USB
  • GPIOs
  • GPUs
  • Cameras

To show you how to work with local resources in the AWS Greengrass Core machine, we will access local GPIO resources. We need an LED that is attached to Raspberry Pi on GPIO 18 (pin 12). You can see this wiring in the following image:

Our aim is to develop a blinking Lambda. This demo will make a blinking LED while the Lambda function is called. The next step is to develop AWS Lambda and then...