htsget-lambda
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:
- Uses the Rust Runtime for AWS Lambda to produce a Lambda function which can be deployed to AWS.
- It is written as a single Lambda function which uses htsget-http to respond to queries.
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:
Then query it through the local URL:
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 enableS3location functionality and any other AWS features.url: used to enableUrllocation functionality.experimental: used to enable experimental features that aren't necessarily part of the htsget spec, such as Crypt4GH support throughC4GHStorage.
License
This project is licensed under the MIT license.