In my node js lambda sam app, I am getting this error: Resource handler returned message: "Unzipped size must be smaller than 262144000 bytes"
On searching more SO posts, I get that we have to either use individual: true
as here
Or we have to exclude node_modules as given here
But my issue is that I am using template.yml
, instead of serverless.yml
which does not support package
attribute and I get this error:
Error: Failed to create changeset for the stack: sam-app, ex: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state: For expression "Status" we matched expected path: "FAILED" Status: FAILED. Reason: Invalid template property or properties [package]
So how do I exclude node_modules
or use individual: true
in my case to reduce the zip size?