React.js on AWS Lambda in 15 minutes or Less

Andre Rabold
BCG Digital Ventures Engineering
11 min readOct 6, 2020

--

Editor’s note June 2021: This post was originally published in October 2020 and has been updated for accuracy and comprehensiveness.

AWS Lambda gained a lot of popularity throughout the last few years, with many engineers adopting it to implement microservices and APIs for a fraction of the costs of traditionally hosted systems with superior scaling capabilities. But did you know that you can also run full-fledged Node.js web apps with React frontends on AWS Lambda without the need for any dedicated EC2 instance?

What we’re covering here

  • We’re creating a Universal App (aka an isomorphic JavaScript App) with server-side rendering with a dynamic configuration context passed from the backend to the browser.
  • The app runs on AWS Lambda enabling blazing fast response times at low costs. Static code and assets are hosted on S3 for the best performance and lowest overhead. This allows you to seamlessly scale your website from simple personal use cases to pages with millions of monthly visitors.
  • We’ll write our code in TypeScript using Babel 7 and Webpack 5. Who wants to live in the past anyway?
  • We’ll keep things lightweight: no redux, react-router, sass, less or any other 3rd party dependencies you might not want or need. The only…

--

--

Andre Rabold
BCG Digital Ventures Engineering

Venture CTO at UP.Labs, BCG Alumni, Co-Founder at Stashimi Inc., Entrepreneur, and Technologist