soak-js
On-the-fly hydration for FaaS. No more input & output size limits.
Install
npm i soak-js
Basic Usage
Before exporting, wrap your function in soak
AWS Lambda
const soak = ; const myFunction = foo: 'bar' exportshandler =
Google Cloud Functions
const soak = ; const myFunction = foo: 'bar' // don't use res.json() exportsmyFunction =
Pass it unlimited inputs
// myBucket/largePayload.json "foo": "bar" "baz": 123
// invoke it with: a: 1 _pointer: 'largePayload.json' // your function sees: a: 1 foo: 'bar' 'baz': 123
Create unlimited outputs
return almost: 'too' large: 'output' // => { almost: 'too', large: 'output' } return too: 'large' json: 'output' // => { _pointer: stashedOutputKey.json }
Platforms
Amazon AWS Lambda | Google Cloud Functions | using soak-js | |
---|---|---|---|
Invocation payload | 6 MB (sync) | 10 MB | unlimited |
256 KB (async) | unlimited | ||
Response | 6 MB (sync) | 10 MB | unlimited |
256 KB (async) | unlimited |
Licence
MIT