Skip to Content
Learning AWS IoT
book

Learning AWS IoT

by Agus Kurniawan
January 2018
Intermediate to advanced
278 pages
5h 13m
English
Packt Publishing
Content preview from Learning AWS IoT

Accessing AWS Lambda from IoT devices

All API SDK for accessing AWS IoT, including AWS Greengrass, can be obtained on the software menu from AWS IoT Management Console. You can install it based on your device and runtime platforms.

In this section, I will show you how to invoke Lambda from AWS Greengrass Core. For testing, I used the Node.js application. You should install the aws-sdk library for Node.js. You also need to access the key ID and secret access key from the AWS IAM.

Please write the following complete program:

var AWS = require('aws-sdk');AWS.config.update({region:'<region>'});var accessKeyId = '<accessKeyId>'var secretAccessKey = '<secretAccessKey>';AWS.config.update({accessKeyId: accessKeyId, secretAccessKey: secretAccessKey}); ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn AWS Serverless Computing

Learn AWS Serverless Computing

Scott Patterson

Publisher Resources

ISBN: 9781788396110Supplemental Content