Skip to content

feat: add lambda http api streaming#218

Merged
floydspace merged 1 commit into
floydspace:mainfrom
yotamishak:feat/lambda-http-api-streaming
May 28, 2026
Merged

feat: add lambda http api streaming#218
floydspace merged 1 commit into
floydspace:mainfrom
yotamishak:feat/lambda-http-api-streaming

Conversation

@yotamishak

@yotamishak yotamishak commented May 20, 2026

Copy link
Copy Markdown
Contributor

solves #156

Summary

Adds LambdaHandler.streamFromHttpApi for streaming HttpApi responses through Lambda Function URLs with response streaming enabled.

Changes

  • Add LambdaHandler.streamFromHttpApi
  • Add lower-level LambdaHandler.httpApiStreamHandler
  • Reuse request/header/cookie conversion between buffered and streaming HttpApi handlers
  • Pipe Web Response.body into awslambda.HttpResponseStream
  • Add README example showing:
    • handle for normal schema responses
    • handleRaw for streamed HttpServerResponse values
  • Add unit test coverage for Lambda Function URL streaming behavior
  • Add a minor changeset for @effect-aws/lambda

Validation

  • pnpm --filter @effect-aws/lambda eslint
  • pnpm --filter @effect-aws/lambda compile
  • pnpm --filter @effect-aws/lambda test
  • Deployed and validated an SST smoke example with progressive chunks over a Lambda Function URL

Notes

  • reused type of ApiGatewayProxyV2 because it adheres to function url type of payload 2.0

Example

A standalone deployable SST example is available at:
https://github.com/yotamishak/effect-aws-lambda-streaming-example

@changeset-bot

changeset-bot Bot commented May 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0664442

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@effect-aws/lambda Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@floydspace floydspace left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @yotamishak

good PR

I'm happy you understood the art...

I wanted to suggest some improvements, but it was a bit tricky, so it is good enough

@yotamishak

Copy link
Copy Markdown
Contributor Author

@floydspace feel free to suggest
lets get this right

@floydspace floydspace merged commit 1e12d67 into floydspace:main May 28, 2026
7 checks passed
@github-actions github-actions Bot mentioned this pull request May 28, 2026
@arjunyel

arjunyel commented Jun 1, 2026

Copy link
Copy Markdown

@yotamishak any chance you can add this to the beta branch? Thank you!

@floydspace

Copy link
Copy Markdown
Owner

@arjunyel I can do that, I noticed the normal release also failed.. gonna check it asap

@floydspace

Copy link
Copy Markdown
Owner

@arjunyel this should be in beta now too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants