Skip to content

MITLibraries/archival-packaging-tool

Repository files navigation

archival-packaging-tool (APT)

A tool for creating Bagit zipfiles.

Development

  • To preview a list of available Makefile commands: make help
  • To install with dev dependencies: make install
  • To update dependencies: make update
  • To run unit tests: make test
  • To lint the repo: make lint

Running Locally with Docker

https://docs.aws.amazon.com/lambda/latest/dg/images-test.html

  • Build the container:

    docker build -t archival-packaging-tool:latest .
  • Run the default handler for the container:

    docker run -e WORKSPACE=dev -p 9000:8080 archival-packaging-tool:latest
  • Post to the container:

    curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}'
  • Observe output:

    "You have successfully called this lambda!"
    

Running a Specific Handler Locally with Docker

If this repo contains multiple lambda functions, you can call any handler you copy into the container (see Dockerfile) by name as part of the docker run command:

docker run -p 9000:8080 archival-packaging-tool:latest lambdas.<a-different-module>.lambda_handler

Environment Variables

Required

SENTRY_DSN=### If set to a valid Sentry DSN, enables Sentry exception monitoring. This is not needed for local development.
WORKSPACE=### Set to `dev` for local development, this will be set to `stage` and `prod` in those environments by Terraform.

Optional

Delete this section if it isn't applicable to the PR.

<OPTIONAL_ENV>=### Description for optional environment variable

About

Archival Packaging Tool (APT)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published