A Git LFS server that runs on AWS serverless-ly. The project uses the AWS CDK to launch a stack that allows uploads and downloads for LFS to be stored in S3 and queried via pre-signed URLS. This is all done the AWS Lambda, so it is very cost-effective. I built this for my personal projects, so it is by no means mean as a fully supported LFS server. Use it at your own risk and consider it more as an example on how to get started.
NOTE: Currently, locking is unsupported as I don't really need it for personal projects. This only works for GitHub.
Generally, I chose to make this one to make this project because I needed a cost-effective alternative to what currently exists. AWS storage costs are extremely cheap, so I decided on that. Especially since the project I had in mind was just over the GitHub GB limit.
The next requirement was a login system that wasn't too hard to maintain. After doing some research I decided to use GitHub personal access tokens for the user to login. That way I didn't have to maintain a database.
I used both git-lfs-s3 and Estranged.Lfs as inspiration for this project.
- Build and deploy the CDK stack.
- Upload a
config.jsonfile to the newly created S3 bucket that was created (there is a sample here). - Add the API Gateway to your
.lfsconfigfile in your project. - On your first pull / push your GitHub username and a personal access token.
npm run buildcompile all the Typescript, use only for local testingnpm run testperform the jest unit testscdk deploydeploy this stack to your default AWS account/region