5 min read
|
Saved February 14, 2026
|
Copied!
Do you care about this?
AWS now supports response streaming in API Gateway, allowing REST APIs to send responses progressively. This reduces wait times, improves user experience in applications like AI chatbots, and handles larger payloads more efficiently.
If you do, here's more
Amazon API Gateway now supports response streaming, a feature designed to enhance the responsiveness of REST APIs. This capability allows applications to send response payloads progressively to clients, which is especially beneficial for interactive applications like AI agents or chatbots. By streaming responses, users see information appear in real time, reducing the wait time that previously led to a disjointed experience. Before this, users often faced delays of up to tens of seconds while waiting for the full response to generate. With streaming, the time-to-first-byte (TTFB) improves significantly, making applications feel more engaging.
Response streaming also addresses limitations with larger payloads. Previously, responses over 10 MB or those requiring longer processing times faced challenges due to API Gateway's size and timeout restrictions. Developers often resorted to workarounds like using pre-signed Amazon S3 URLs, which added complexity and latency. Now, response streaming allows developers to send larger responses directly through the API, supporting payload sizes over 10 MB and requests lasting up to 15 minutes. Companies like Salesforce Commerce Cloud have already seen substantial performance gains, reporting over a 98% drop in Total Blocking Time metrics.
To implement response streaming, developers need to configure their API integrations to set the response transfer mode to STREAM. This adjustment can be made through the API Gateway console, Open API specifications, or infrastructure-as-code frameworks like AWS CloudFormation. For Lambda functions using this feature, the response must include specific components such as JSON metadata and an 8-null-byte delimiter, which simplifies the process of streaming data back to clients.
This new function not only streamlines the user experience but also allows developers to focus on building applications without the hassle of managing complex infrastructure constraints. The integration is straightforward, enabling teams to enhance their APIs quickly and effectively.
Questions about this article
No questions yet.