Skip to content
Example local Lambda functions that can be used with AWS Greengrass and the AWS Greengrass Provisioner.
Java Python Shell JavaScript Dockerfile
Branch: master
Clone or download
Latest commit e9b6b46 Dec 5, 2019

README.md

AWS Greengrass Lambda Functions

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.

How do I launch these functions with the provisioner?

Step 1: Clone this repo

Step 2: Read the provisioner command-line examples

Current function list

  • 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
    • RaspberryPiGpioPython3 - Event driven GPIO handler for the Raspberry Pi (no polling)
    • LatencyTesterPython3 - Sends ping requests to a fixed list of hosts and publishes the round trip ICMP ping time via MQTT
    • CloudWatchMetricHandlerPython3 - Sends latency information to AWS as CloudWatch Metric values (used with LatencyTesterPython3)
    • SecretsManagerPython3 - Retrives a secret from Secrets Manager and publishes the value on a topic for testing purposes
  • 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
    • CDDLatencyDashboard - a Vaadin-based dashboard to show latency information (used with LatencyTesterPython3)
  • C

  • Greengrass Provisioner functionality examples

License Summary

This sample code is made available under a modified MIT license. See the LICENSE file.

You can’t perform that action at this time.