Completely serverless implementation of the Ruuvi Network.
- Clone the repository (
git clone git@github.com:ruuvi/ruuvi-network-serverless.git
) - Install NodeJS
- Install the Serverless Framework (https://www.serverless.com/framework/docs/providers/aws/guide/installation/)
- Install the AWS CLI (https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
- Run
npm i
in the cloned repository folder - Additionally, you want to
./install_dependencies.sh
for the global packages - 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
- Run
serverless deploy
(for staging) orserverless 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!
- Apply to get out of SES Sandbox (if necessary)
- 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
- Reader Lambda reads from Kinesis
- Reader Lambda writes to DynamoDB
- Register User
- Claim sensor
- Share sensor
- Read Sensor Data (currently authorized with static Bearer string)
- Update sensor information
- Advanced querying (by Date / etc)
- Lambda to archive to S3