boden
boden

Reputation: 1681

Is there any way to to send large file through API Gateway?

I'm working on the application that will receive files from users and then upload to Amazon S3. The application is accessed using API Gateway. The service API Gateway has limits for payload size for both WebSocket and REST APIs. Is there any way to access my service from the Internet through API Gateway?

enter image description here

enter image description here

Upvotes: 3

Views: 5439

Answers (1)

Robert Navado
Robert Navado

Reputation: 1329

API gateway is not intended to be data transfer gateway, but lightweight API definition layer.

The most suitable approach is to generate temporary pre-signed upload URL and redirect (30X) requests there. API Gateway should define an endpoint, calling lambda function which generates pre-signed S3 URL and redirect post request there (after user's authentication of course).

Please refer an example of app with API Gateway and pre-signed S3 URLs to upload files

API documentation for generating pre-signed S3 URLs in Python, AWS CLI and even Go-lang

Upvotes: 7

Related Questions