The AWS Greengrass Core SDK for JavaScript allows developers to write JavaScript Lambda functions that will run within Greengrass. This document provides instructions for preparing your Greengrass Core environment to run Lambda functions written in JavaScript. It also includes examples on how to develop a Lambda function in JavaScript as well as packaging and running an example Hello World file in JavaScript for your Greengrass core. The environment where Greengrass is running on needs to be able to run NodeJS 12.x applications. Unzip the SDK into your node_modules folder of your function. This should create a aws-greengrass-core-sdk folder which includes the SDK. Your console.log operation will be logged as INFO. A console.error operation will be logged as error. Currently, our NodeJS SDK only allows you to log at info or error level only.
Features
- In Greengrass, you can send a context object in a JSON format to be passed to another Lambda that is being invoked
- Stream manager supports automatic data export to AWS S3 and AWS IoT SiteWise
- Provides new API method to update existing streams, and pause or resume exporting
- Added support for StreamManager
- Choose any role as the role is not used within Greengrass
- Unzip the SDK into your node_modules folder of your function