David Martin
05/18/2022, 6:54 PMlayers/sharp
directory and extracted this zip file into it: https://github.com/Umkus/lambda-layer-sharp/releases as described here https://serverless-stack.com/examples/how-to-automatically-resize-images-with-serverless.html
local deployment works, but SEED deployment fails since layers/sharp/nodejs/node_modules
isn’t committed to git.
should i solve this by having a SEED before_compile
step where i download and extract that zip file?David Martin
05/18/2022, 6:57 PMError: Cannot find asset at /tmp/seed/source/layers/sharp
Ross Coundon
05/18/2022, 7:03 PMconst sharpLayer = new LayerVersion(ctx.stack, 'SharpLayer', {
code: Code.fromAsset('layers/sharp'),
compatibleRuntimes: [Runtime.NODEJS_14_X, Runtime.NODEJS_16_X],
});
and the layers/sharp folder looks like this:David Martin
05/18/2022, 7:06 PMDavid Martin
05/18/2022, 7:07 PMbefore_compile
hook to download the zip file, then unzip itRoss Coundon
05/18/2022, 7:07 PMRoss Coundon
05/18/2022, 7:07 PMDavid Martin
05/18/2022, 7:08 PM