Skip to content

Files

Latest commit

67a86f0 · Jan 14, 2025

History

History

nextjs-response-streaming

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Apr 23, 2024
Apr 20, 2023
Apr 23, 2024
Apr 20, 2023
Apr 23, 2024
Apr 20, 2023
Apr 20, 2023
Apr 20, 2023
Jan 14, 2025
May 5, 2023
Apr 23, 2024
Sep 23, 2024
Sep 23, 2024
Apr 20, 2023
Apr 23, 2024
Apr 23, 2024
May 14, 2023
Apr 20, 2023

Nextjs response streaming example

This example show how to use Lambda Web Adapter to run a nextjs application with response streaming via a AWS Lambda Function URL.

Build and Deploy

Run the following commands to build and deploy the application to lambda.

sam build

sam deploy --guided

When the deployment completes, the Function URL will appear in the output list, which is the entrypoint for accessing

Verify it works

When you open the Function URL in a browser:

  • Primary product information will be loaded first at part of the initial response

  • Secondary, more personalized details (that might be slower) like recommended products and customer reviews are progressively streamed in.

Thanks

Page content and styles are powered by the Next.js App Router Playground - Streaming with Suspense.