Hello. I’m trying to build a rest api with python ...
# help
Hello. I’m trying to build a rest api with python (https://github.com/serverless-stack/serverless-stack/tree/master/examples/rest-api-python).
npm run start
works fine but
npm run deploy
gives an error
Resource handler returned message: "Unzipped size must be smaller than 262144000 bytes"
. I’m guessing this is because it is uploading _*node_modules*_ as I’m not using any python imports_*.*_ How can I prevent _*node_modules*_ from being deployed?
Are you using any layers? I literally had the same issue yesterday but using TypeScript. If I referenced a layer and deployed I got that message. I removed the layer, deployed, then re-added it and deployed again and the message went away. https://github.com/agutoli/serverless-layers/issues/51
I’m not using any layers
@Rayaan Hussain for python we upload the entirety of the
which is set to
in that example
@Rayaan Hussain Yeah just to expand on that,
should be at ur root, and SST is only zipping up
as the Lamba package.
If u run
sst build
, and then go into
, you should be able to see the Lambda packages created. You can check what is taking up the most space.