Skip to content
GitHub Discord

AWS Hono streaming

An example on how to enable streaming for Lambda functions using Hono.

sst.config.ts
{
streaming: true
}
index.ts
export const handler = streamHandle(app);

To test this in your terminal, use the curl command with the --no-buffer option.

Terminal window
curl --no-buffer https://u3dyblk457ghskwbmzrbylpxoi0ayrbb.lambda-url.us-east-1.on.aws

Streaming is also supported through API Gateway REST API.

sst.config.ts
const hono = new sst.aws.Function("Hono", {
url: true,
streaming: true,
timeout: "15 minutes",
handler: "index.handler",
});

View the full example.