Aws node signed uploads

Upload files larger than 10MB with AWS Lambda and API Gateway. Can be developed and tested locally.

View on Github

AWS Node Signed Uploads

codecov Build Status


  • Node.js (nvm use to use carbon suggested by project's .nvmrc)
  • npm which comes with Node.js


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)


If you prefer to use a different region or stage, change these:

$ export AWS_STAGE=
$ export AWS_REGION=

Defaults are dev and eu-central-1.

Change name of upload bucket:

bucketName: testBucket

File name to sign

The file you want to upload is signed via x-amz-meta-filekey header.

How to use

Get dependencies with yarn or npm install. The following examples will assume the usage of yarn.

Issue a GET request to get the signed URL:

curl --request GET \
  --url https://{serviceID}.execute-api.{region} \
  --header 'x-amz-meta-filekey: the-road-to-graphql.pdf'

If your bucket is called foo, and you upload the-road-to-graphql, after receiving the signed URL, issue a PUT request with the information you have signed:

curl --request PUT \
  --url '' \
  --data 'somemething-awesome'


Here's a short list of possible integrations I found making a quick Google search:


Running all tests:

$ yarn test

Developing tests:

$ npx jest --watch

Develop locally

Starting a local dev server and its endpoint for receiving uploads:

$ yarn start


Starting the linter tasks:

$ yarn lint


Setup your AWS credentials.

Run the following the fire the deployment:

$ yarn deploy