async-labs / saas

Build your own SaaS business with SaaS boilerplate. Productive stack: React, Material-UI, Next, MobX, WebSockets, Express, Node, Mongoose, MongoDB. Written with TypeScript.
https://saas-app.async-await.com
MIT License
4.13k stars 688 forks source link

Chapter 9: AWS Lambda Serverless Deployment issue (over size) #192

Closed Dolvido closed 1 year ago

Dolvido commented 1 year ago

Hi!

Worked along with the book up through chapter 9 when attempting to deploy the project in the recommended way (api symlink, copying api project package.json and associated modules) and ran into the issue when trying to run the 'serverless deploy' command along with the book's instructions. output from command:

Environment: linux, node 12.22.0, framework 3.25.1, plugin 6.2.2, SDK 4.3.2 Credentials: Local, "default" profile Docs: docs.serverless.com Support: forum.serverless.com Bugs: github.com/serverless/serverless/issues

Error: CREATE_FAILED: SendEmailForNewPostLambdaFunction (AWS::Lambda::Function) Resource handler returned message: "Unzipped size must be smaller than 262144000 bytes (Service: Lambda, Status Code: 400, Request ID:)" (RequestToken: , HandlerErrorCode: InvalidRequest)

Just curious how you would work around the size limit for the lambda project when mirroring the packages from the api project/using the api symlink. Thank you for your time!

tima101 commented 1 year ago

250+ MB seems too large SendEmailForNewPostLambdaFunction

I plan upgrade serverless and review serverless instructions in the book later this month. We will send out email after upgrade.