500 error on initial function call

Hi @hhosseinipaymentshie

You might find this thread of interest which states

we’ve seen functions accept up to 6mb files.

Part of solving the issue is providing the x-nf-request-id for a failed call so Netlify can investigate.

Also, if you can share a repository (if not the one you are deploying, a minimal reproduction) this would also help.