Error deploying next js app

My app is building correctly but is failing while deploying showing the following error:
“Failed to create function on AWS Lambda: invalid parameter for lambda creation: Unzipped size must be smaller than 262144000 bytes”

Netlify site name. https://dev-hermisinda-20.netlify.app/
Deploy log:

10:56:16 PM: Deploy site                                                   
10:56:16 PM: ────────────────────────────────────────────────────────────────
10:56:16 PM: ​
10:56:16 PM: Starting to deploy site from ".next"
10:56:16 PM: Calculating files to upload
10:56:17 PM: 35 new files to upload
10:56:17 PM: 3 new functions to upload
10:56:20 PM: Failed to create function on AWS Lambda: invalid parameter for lambda creation: Unzipped size must be smaller than 262144000 bytes
10:56:20 PM: Failed to create function on AWS Lambda: invalid parameter for lambda creation: Unzipped size must be smaller than 262144000 bytes
10:56:24 PM: The function "___NETLIFY-HANDLER" is larger than the 50MB limit. Please consider reducing it.
10:56:25 PM: The function "___NETLIFY-ODB-HANDLER" is larger than the 50MB limit. Please consider reducing it.
10:56:25 PM: The function "___NETLIFY-ODB-HANDLER" is larger than the 50MB limit. Please consider reducing it.
10:56:26 PM: The function "___NETLIFY-ODB-HANDLER" is larger than the 50MB limit. Please consider reducing it.
10:56:28 PM: The function "___NETLIFY-ODB-HANDLER" is larger than the 50MB limit. Please consider reducing it.
10:56:28 PM: The function "___NETLIFY-ODB-HANDLER" is larger than the 50MB limit. Please consider reducing it.
10:56:30 PM: The function "___NETLIFY-ODB-HANDLER" is larger than the 50MB limit. Please consider reducing it.
10:56:31 PM: The function "___NETLIFY-ODB-HANDLER" is larger than the 50MB limit. Please consider reducing it.
10:56:33 PM: The function "___NETLIFY-ODB-HANDLER" is larger than the 50MB limit. Please consider reducing it.
10:56:33 PM: The function "___NETLIFY-ODB-HANDLER" is larger than the 50MB limit. Please consider reducing it.
1 Like

Hi @luisjuarros_netlify1,

Thanks for reaching out and welcome to Netlify’s Support Forums!

Have you seen our docs here:

Could you try and to see if it resolves the issue?

Also I found this forum post of a similar issue that has a solution: