Reputation: 1447
Is there any way I can stream content in API response which is backed by AWS API gateway. My content can be very large size and i want to stream it to the requestor. At present i see there is a limit of 10Mb payload size on API Gateway.
I also generate the data at runtime when i get the request on my EC2 machine and as soon as some data is generated i want to start streaming it to the requestor.
Is it possible? How?
Upvotes: 3
Views: 6564
Reputation: 8484
As you've seen, API Gateway has hard limits response sizes. This is because it's designed for quick and transactional use-cases. (API Gateway will also not keep a connection open longer than 30 seconds, so if you're streaming a file that takes longer than this to download, you'd be in trouble too.)
For these cases you might consider a different pattern, like:
Upvotes: 3