Example local Lambda functions that can be used with AWS Greengrass and the AWS Greengrass Provisioner. This repo contains the functions and the deployment configurations to launch those functions in different configurations.
Step 1: Clone this repo
Step 2: Read the provisioner command-line examples
-
Python
- BenchmarkPython - a naive benchmark that creates a pinned function that sends messages to itself
- HTTPPython - sends HTTP requests from the core to any address (local network or otherwise), triggered by MQTT messages from the cloud
- HelloWorldPython2 - Hello, World in Python 2
- HelloWorldPython3 - Hello, World in Python 3
- HelloWorldPythonWithCloudFormation - Hello, World in Python with a CloudFormation template that demonstrates how to build republish rules that the provisioner can launch automatically
- LiFXPython - control LiFX bulbs
- SocketServerPython - an example of how to listen on a socket in Python and relay the inbound TCP messages to the cloud via MQTT
-
NodeJS
- HelloWorldNode - Hello, World in Node
- HTTPNode - sends HTTP requests from the core to any address (local network or otherwise), triggered by MQTT messages from the cloud
- WebServerNode - an example of how to create an Express web server in a pinned Lambda function
-
Java with Cloud Device Driver framework
- CDDSkeletonJava - shows how the Java Cloud Device Driver framework can be used
- CDDDMIJava - relays Desktop Management Interface (DMI) information to the cloud when requested via MQTT
- CDDBenchmarkJava - a naive Java benchmark that creates a pinned function that sends messages to itself
- CDDSenseHatJava - shows how to control a SenseHat display on a Raspberry Pi
- CDDDockerJava - shows how to control Docker with Greengrass
-
C
- ARM32SampleC - Hello World in C for ARM32 architectures
- X86_64SampleC - Hello World in C for X86_64 architectures
-
Greengrass Provisioner functionality examples
- Reusing functions from other groups (benchmark example) - shows how to reuse existing functions in the Greengrass Provisioner by using the tilde
~
wildcard
- Reusing functions from other groups (benchmark example) - shows how to reuse existing functions in the Greengrass Provisioner by using the tilde
This sample code is made available under a modified MIT license. See the LICENSE file.