git-lfs-lambda

1.0.1 • Public • Published

Git LFS Lambda

Git-lfs-lambda (GLL for short) is intended to be an easy, push-button solution to deploying a git-lfs endpoint for a git repo. It uses AWS Lambda and AWS API Gateway to handle requests and instructs the git lfs client to store binary files in AWS S3. The actual server implementation is in a separate project; this project focuses on the deployment of a service instance.

Caution!

This project is not production ready. Using the create command will generate a production stack that does not implement any form of authorization or authentication. This means that anyone with the REST API endpoint url can use it to store files in your S3 bucket. This will eventually be corrected, but in the meantime use at your own risk!

If you need a temporary solution that is less risky, the core server code project contains instructions on how to use it locally, independent of a full AWS deployment.

Getting Started

Install by cloning this repository or via NPM with:

npm install git-lfs-lambda

The gll script in the root directory is the primary entry point, and currently features two commands.

Create

gll create myRepoName

This will create and deploy the entire git-lfs-lambda server setup, configured for a repo named 'myRepoName'. The primary AWS artifacts that will be created are:

  • S3 bucket: myRepoName-git-lfs-lambda
    • The primary artifacts bucket where the repo's binary files will go.
  • S3 bucket: myRepoName-git-lfs-lambda-deployment
    • Another S3 bucket used in the deployment of the service. If desired, this can be removed once the deployment is complete.
  • Lambda functions: myRepoName-git-lfs-lambda-*
    • There are 6 lambda functions in total. 5 as part of the git-lfs server spec and an additional one to serve the optional 'verify' action.
  • REST API: myRepoName-git-lfs-lambda-stack
    • The API Gateway endpoints for the git-lfs functions.
  • CloudFormation stack: myRepoName-git-lfs-lambda-stack
    • Entire service stack entity.

Details on other minor artifacts such as IAM roles and permissions can be found in the CloudFormation stack details.

Delete

gll delete myRepoName

Delete will attempt to remove the entire git-lfs-lambda stack, as well as the deployment bucket. For safety, no non-empty buckets will be removed.

Built With

Contributing

There's lots to do, go for it.

Versioning

GLL uses SemVer for versioning. For the versions available, see the releases page

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

Package Sidebar

Install

npm i git-lfs-lambda

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

28 kB

Total Files

20

Last publish

Collaborators

  • kengeorge