3

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

1 Answer 1

8

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.

4
  • please check aws.amazon.com/about-aws/whats-new/2016/11/…
    – Sabreena
    May 2, 2017 at 8:03
  • thanks for the heads up, this approach is still not universally suitable for file uploads
    – adamkonrad
    May 2, 2017 at 15:21
  • Can i send audio to s3 via amazon api gateway?
    – Sabreena
    May 3, 2017 at 7:07
  • @Sabreena you can send any content through it, but I'd recommend doing direct S3 upload instead
    – adamkonrad
    May 3, 2017 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.