"Request must be smaller than 69905067 bytes for the CreateFunction operation" due to images

I am using the “Next on Netlify” plugin to build my nextjs site. On the site I am using next-optimized-images to optimize images and create different sizes for images. Since it creates multiple sizes for the images, the combined size of the image files exceeds 50MB and hence I get the error Request must be smaller than 69905067 bytes for the CreateFunction operation.

Is there any way to fix this whilst keeping the different sizes of images?

Hi @aman,

Unfortunately that error is the result of AWS’ limits. The zip of the function must be less than 50 MiB. So, bypassing that won’t be possible.