Skip to content

Deployment logic for htsget-rs

License

Notifications You must be signed in to change notification settings

umccr/htsget-deploy

Repository files navigation

htsget-deploy

Deploy a cloud-based implementation of htsget-rs. This project contains a reusable CDK construct that deploys [htsget-lambda] using an AWS API Gateway function and an example CDK stack.

Quickstart

Here's how to deploy htsget-rs's htsget-lambda to AWS:

  1. Install packages by running npm install or pnpm install.
  2. Authenticate to your AWS account (preferably using SSO).
  3. Modify the bin/settings.ts, according to your preferences. All options are documented at docs/CONFIG.md.
  4. Run npx cdk deploy.

Does it work?

A simple curl command should be able to determine that:

curl "https://htsget.ga4gh-demo.org/reads/service-info"

Should return a response similar to the following:

{
  "id": "htsget-lambda/0.5.2",
  "createdAt": "2025-01-22T23:29:34.423733522+00:00",
  "name": "htsget-lambda",
  "version": "0.5.2",
  "updatedAt": "2025-01-22T23:29:34.423735886+00:00",
  "description": "A cloud-based instance of htsget-rs using AWS Lambda, which serves data according to the htsget protocol.",
  "organization": {
    "name": "",
    "url": ""
  },
  "documentationUrl": "https://github.com/umccr/htsget-rs",
  "type": {
    "group": "org.ga4gh",
    "artifact": "htsget",
    "version": "1.3.0"
  },
  "htsget": {
    "datatype": "reads",
    "formats": [
      "BAM",
      "CRAM"
    ],
    "fieldsParametersEffective": false,
    "tagsParametersEffective": false
  }
}

Please note that the example above assumes a publicly accessible endpoint. If you have an authz'd deployment, please add -H "Authorization: $JWT_TOKEN" flags to your curl command.

Library

The HtsgetConstruct is published as an NPM package so that it can be used as construct in other projects.

Local development

This project uses pnpm as the preferred package manager. To install and update the lock file, run:

pnpm install

To generate the config docs, run:

npx typedoc