Lift and shift a web app to serverlessApplication overview1 min

Our example application is a MERN application. The original (legacy) application is hosted on two different servers: one contains the Mongo database and another contains the Node/JS/Express and ReactJS applications.

The application is a swag ecommerce site. The database layer stores the products, users, and the purchase history. The server layer takes care of the ecommerce business logic, hosting the product images, and user authentication and authorization. The web layer takes care of all the user interaction and communicates with the server layer using REST APIs.

These are the changes that we must make to migrate to a serverless environment:

  • Database migration: Migrate the database from on-premises to MongoDB Atlas.
  • Backend migration: Migrate the NodeJS/Express application from on-premises to an AWS Lambda function.
  • Web app migration: Migrate the React web app from on-premises to AWS Amplify.
  • Authentication migration: Migrate the custom-built authentication to use Amazon Cognito.
  • Storage migration: Migrate the local storage of images to use Amazon S3 and Amazon CloudFront.

The following image shows the proposed solution for the migrated application:


Created by:

Marcia Villalba
Marcia VillalbaMarcia hosts the FooBar Serverless YouTube channel where she publishes content every week related to serverless and the cloud. She has been designing and developing software professionally for 15 years and worked in all the different stages of building scaling and performant software.