Skip to content

Fedora Repository API implemented with AWS Lambda, API Gateway and DynamoDB

License

Notifications You must be signed in to change notification settings

duraspace/lambdora

Repository files navigation

Build Status

Lambdora

A serverless implementation of the Fedora Repository API on AWS. Uses the following technologies:

  • Serverless.com toolkit: Used to deploy all resources to AWS.
  • API Gateway: Handles all REST requests
  • Lambda: Java code that responds to all requests and sends back responses.
  • DynamoDB: Data storage layer for all RDF triples

Documentation

Additional documentation is available in the project wiki: https://github.com/duraspace/lambdora/wiki

Setup

  1. Download and install serverless and configure aws credentials https://serverless.com/framework/docs/providers/aws/guide/quick-start/#pre-requisites
  2. Install Gradle: https://gradle.org/install/
  3. gradle wrapper
  4. ./gradlew build
  5. Deploy serverless deploy --aws-profile <your-profile-name> [--region <aws-region-name-here>]

Tests

Tests are run as part of the Gradle build process described above. Test results are available via a website which is generated by the build and can be accessed by opening <lambdora-project-dir>/lambdora-service/build/reports/tests/test/index.html in a web browser. These pages provide a summary of tests run.

Monitoring Logs

Currently all requests to Lambdora are logged (to provide for easier debugging of REST requests). These logs can accessed via serverless as follows:

serverless logs -f ldpJersey -t --aws-profile <your-profile-name> [--region <aws-region-name-here>]

You may wish to pipe this output to a local file (> lambdora-logs.txt) in order to more easily parse/monitor the requests.

Redeploy / Teardown

Redeploy minor changes

For minor updates (e.g. code changes, or Lambda function changes) should be possible to redeploy by simply rerunning the same deploy command:

serverless deploy --aws-profile <your-profile-name> [--region <aws-region-name-here>]

Teardown & Redeploy major changes

If you wish to redeploy major updates, you may need to first teardown the existing stack. Be warned that this destroys all existing content, tables, REST endpoints, etc.

serverless remove --aws-profile <your-profile-name> [--region <aws-region-name-here>]

Code License

All code is licensed under Apache 2. See LICENSE file in root directory.

About

Fedora Repository API implemented with AWS Lambda, API Gateway and DynamoDB

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •