/ruuvi-network-serverless

Fully Serverless Alternative

Primary LanguageJavaScript

Ruuvi Network (Serverless)

Completely serverless implementation of the Ruuvi Network.

Ruuvi Network Serverless Architecture

Installation

  1. Clone the respository (git clone git@github.com:Muhwu/ruuvi-network-serverless.git)
  2. Install the Serverless Framework (https://www.serverless.com/framework/docs/providers/aws/guide/installation/)
  3. 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

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 SQS

Writer

  • Reader Lambda reads from SQS
  • 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