Skip to content

starpebble/edge-greenery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Edge Greenery

Edge Greenery is a serverless app that demonstrates Lambda with a local DynamoDB database.

Overview

Edge Greenery examples an 'off the cloud' development environment. Sometimes it is easier to test and develop locally. That's why off cloud environment are helpful. The lambda function connects to a local DynamoDB database. When there are no items in the database, the function throws an error.

SAM and Docker

The Serverless Application Model (SAM) command line interface (cli) tools run lambda functions locally in a docker container. Edge Greenery uses a NodeJS engine, so the sam tools will download NodeJS v8.10. It's easy. The example executes on NodeJS v8.10 within a Docker image provided by Amazon Web Services (AWS) for you.

What's in Here

The app intentionally throws an error. To address the error, put an item into the local DynamoDB table.

A schema for the 'edge-greenery-table' is provided in a json file. A SAM YAML template is provided, too.

The serverless app uses modern JavaScript syntax.

Dependencies

Download and install the following dependencies:

  • NodeJS (6.10 or later)
  • npm (3.10 or later)
  • Java (v8 or later)
  • Python (v2.7 only)
  • Go (v1.10 or later)
  • Docker (v18.03 or later)
  • aws sdk (v1.15.21 or later)
  • sam cli tools (v0.3.0 or later)

Recommended developer software for Mac OS X users:

  • XCode (v9.0 or later)

Use Instructions

* Launch DynamoDB

java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb

* Create a table in DynamoDB

aws dynamodb create-table --endpoint-url http://localhost:8000 --cli-input-json file://edge-greenery-schema.json

* Install node_modules

npm install

* Invoke the lambda function locally

echo "{}" | sam local invoke

References

Support

Please create an issue for the github project, for support. The serverless app depends on lots of fun, awesome open source projects. Feel free to ask questions about installing any dependency.

License

MIT License

About

๐Ÿ€ Edge Greenery is a serverless app that connects to a local DynamoDB database.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published