/cf-lambda-streaming

Enable your AWS Lambda hosted applications to stream responses via Cloudflare Workers.

Primary LanguageJavaScript

cf-lambda-streaming

Enable your AWS Lambda hosted applications to stream responses via Cloudflare Workers.

Overview

HTTP request -> CF Worker -> CF DO configurable load balancer-> WebSocket -> AWS -> WebSocket -> CF DO -> CF Worker -> HTTP Response

Architecture diagram

Deploying

Build the remix app:

npm run build

Deploy to AWS:

npx arc deploy production

Copy the HTTP and WS URL's printed at the end of the deployment into wrangler.toml with HTTP as ORIGIN_URL and WS as SOCKET_URL.

Deploy to Cloudflare:

npx wrangler publish