htsget-lambda 0.8.1

A cloud-based instance of htsget-rs using AWS Lambda, which serves data according to the htsget protocol.
Documentation

htsget-lambda

MIT licensed Build Status

Framework dependent code for a cloud-based instance of htsget-rs, using AWS Lambda.

Overview

This crate is used for running a cloud-based instance of htsget-rs. It:

Usage

This crate is intended to be deployed to AWS as a Lambda function. It is configured in the same way as htsget-axum, by using the htsget-config. However, given that it is a Lambda function, environment based config is recommended over TOML files.

Pre-built Lambda deployment packages are attached to each htsget-lambda release as htsget-lambda-v<version>-<arch>.zip files for arm64 and x86_64.

See htsget-search for details on how to structure files.

Development

This crate can be locally compiled and tested using cargo-lambda. For example, run the function locally:

cargo lambda watch -p htsget-lambda

Then query it through the local URL:

curl localhost:9000/lambda-url/htsget-lambda/reads/service-info

Environment variables can be set when using cargo-lambda. cargo lambda invoke can be used to send raw Lambda events such as API Gateway requests to the function.

As a library

There is no need to interact with this crate as a library. Note that the Lambda function itself doesn't have any library code, and it instead uses htsget-axum. Please use that crate for functionality related to routing.

Feature flags

This crate has the following features:

  • aws: used to enable S3 location functionality and any other AWS features.
  • url: used to enable Url location functionality.
  • experimental: used to enable experimental features that aren't necessarily part of the htsget spec, such as Crypt4GH support through C4GHStorage.

License

This project is licensed under the MIT license.