This is a small SST app demonstrating LambdaHandler.streamFromHttpApi from @effect-aws/lambda with Lambda Function URL response streaming.
Lambda response streaming works with Lambda Function URLs configured with InvokeMode: RESPONSE_STREAM. API Gateway HTTP API integrations do not support Lambda response streaming.
This example requires the unreleased @effect-aws/lambda change that includes LambdaHandler.streamFromHttpApi. The dependency is installed from a local checkout at ../effect-aws/packages/lambda.
Build the local package before installing or deploying this example:
cd ../effect-aws
pnpm install
pnpm --filter @effect-aws/lambda buildGET /pingreturns a normal JSON schema response withhandleGET /streamreturns a progressive text stream withhandleRawandHttpServerResponse.stream
pnpm install
pnpm run deployThe deploy output includes StreamingUrl.
Normal JSON response:
curl <StreamingUrl>/pingProgressive streaming response:
curl -N <StreamingUrl>/streamOr run the smoke script:
pnpm run smoke <StreamingUrl>Expected output shows chunk 1, chunk 2, chunk 3, and done arriving about one second apart.
pnpm run remove