Skip to content

ruuvi/ruuvi-network-serverless

Repository files navigation

Ruuvi Network (Serverless)

Completely serverless implementation of the Ruuvi Network.

Ruuvi Network Serverless Architecture

Installation

  1. Clone the repository (git clone git@github.com:ruuvi/ruuvi-network-serverless.git)
  2. Install NodeJS
  3. Install the Serverless Framework (https://www.serverless.com/framework/docs/providers/aws/guide/installation/)
  4. Install the AWS CLI (https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
  5. Run npm i in the cloned repository folder
  6. Additionally, you want to ./install_dependencies.sh for the global packages
  7. Set AWS Credentials in ~/.aws/credentials (Profile ruuvi by default; can be found in AWS "My Security Credentials")
[ruuvi]
aws_access_key_id=<Your access key>
aws_secret_access_key=<Your secret access key>
region=eu-central-1
  1. Run serverless deploy (for staging) or serverless deploy --stage prod

If everything is set up correctly, it will update the stack to match the state in the cloned repository.

Note! This has not yet been tested with multiple points of deployment.

Enjoy!

Current Status

Services and Limits

  • Apply to get out of SES Sandbox (if necessary)

Receiver

  • CloudFront for Throttling (This might be built in)
  • API Gateway forwards payloads to Receiver Lambda
  • Receiver Lambda authorizes request
  • Receiver Lambda validates request (rudimentary)
  • Receiver relays data to Kinesis

Writer

  • Reader Lambda reads from Kinesis
  • Reader Lambda writes to DynamoDB

Client API

  • Register User
  • Claim sensor
  • Share sensor
  • Read Sensor Data (currently authorized with static Bearer string)
  • Update sensor information
  • Advanced querying (by Date / etc)

Cleaners / Archivers

  • Lambda to archive to S3

About

Fully Serverless Alternative

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •