Skip to content

aws-samples/lwa-nextjs-response-streaming-example

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.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •