- Node.js >= 6.9.1
- npm >= 3.10.8
If you have landed to this project out of curiosity for the technologies behind the service, you can see implementation details in this article.
The approach implemented in this service is useful when you want to use Amazon API Gateway and you want to solve the 10MB payload limit.
The service is based on the serverless framework. The service is uploading objects to a specific S3 bucket using a pre-signed URL. Implemented in node.js runtime using getSignedUrl method.
The package is targeting the latest runtime of AWS Lambda. (8.10)
- Create
config.json
Example is provided in config.example.json
.
- Create a bucket for the file uploads
The name of the folder should be matching bananabucket-${self:provider.stage}
, where ${self:provider.stage}
is dynamically calculated based on the settings of config.json
.
Of course you can also change the name of environment variable completely from BUCKET: bananabucket-${self:provider.stage}
, but where's the fun of not having a bananabucket
?
The file you want to upload is signed via x-amz-meta-filekey
header.
Here's a short list of possible integrations I found making a quick Google search:
Get dependencies with yarn
or npm install
. The following examples will assume the usage of yarn
.
Running all tests:
$ yarn test
Developing tests:
$ npx jest --watch
Starting a local dev server and its endpoint for receiving uploads:
$ yarn start
Starting the linter tasks:
$ yarn lint
Run the following the fire the deployment:
$ yarn deploy