Is it possible to upload a file from a web form to S3 through API Gateway? The 'method request' and 'integration request' has no way to configure the file upload. Or there is and I am missing it?
1 Answer
It's possible to POST binary file uploads through API Gateway
. However the binary data is converted to base64
encoded text. This has implications on memory consumption and processing the data. Data has to be processed as a buffer not as a stream.
See the following questions API Gateway file uploads and API Gateway binary data form POST.
-
-
thanks for the heads up, this approach is still not universally suitable for file uploads May 2, 2017 at 15:21
-
-
@Sabreena you can send any content through it, but I'd recommend doing direct S3 upload instead May 3, 2017 at 13:42