Processing large images with Sharp on Lambda@Edge

497 Views Asked by At

When using Sharp in a function deployed to Lambda@Edge I'm getting the following error:

vips__write: write failed unix error: No space left on device

Running on Lambda, this can be fixed using the VIPS_DISC_THRESHOLD env variable, but since env variable are not allowed for Lambda@Edge I'm looking for an alternative solution.

1

There are 1 best solutions below

0
On

This solved it for me:

process.env.VIPS_DISC_THRESHOLD = '750m'