Take note of the API Gateway and AWS Lambda limitation, especially when working with binary files.
- API Gateway can only receive a maximum of 10 MB payload, meaning if you exceeded that, the client will receive an error 413 Request Entity Too Large
- However, if you combining API gateway with AWS Lambda, there is also a limitation of 6 MB for both inbound and outbound payload.
One approach is to open an alternative channel such as S3 and have the client upload the binary file directly and have lambda do the necessary background process.
For an in-depth details of the limits, please see the AWS documentation.