Function Compute limits the HTTP request body size. For synchronous invocations, the limit is 32 MB. For asynchronous invocations, the limit is 128 KB. To request an increase in the asynchronous invocation limit to 256 KB, submit a ticket. For more information about limits, see HTTP/HTTPS protocol limits.
Lower the body size limit
To block oversized requests, you can set a lower body size limit in your function's code.
Multipart upload
The platform blocks requests that exceed the body size limit. These requests will not reach your function. To transmit a large body, you can use the multipart upload feature of the HTTP protocol to split it into parts.