[{"data":1,"prerenderedAt":137},["ShallowReactive",2],{"content-paved-path-lift-and-shift-a-web-app-to-serverless-3-application-overview":3},{"markdown":4,"frontMatterAttributes":5,"bodyRaw":8,"contributorPaths":9,"menuType":11,"contentName":12,"slug":13,"readingTime":14,"menu":15,"nextDocItem":52,"previousDocItem":39},"\u003Cp>Our example application is a \u003Ca href=\"https:\u002F\u002Fwww.mongodb.com\u002Fmern-stack\">MERN\u003C\u002Fa> application. The original (legacy) application is hosted on two different servers: one contains the Mongo database and another contains the Node\u002FJS\u002FExpress and ReactJS applications.\u003C\u002Fp>\n\u003Cimg src=\"\u002Fassets\u002Fexternal\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002Fassets\u002Farch-diagram.png\"\u002F>\n\n\u003Cp>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 \u003Ca href=\"https:\u002F\u002Faws.amazon.com\u002Fwhat-is\u002Frestful-api\u002F\">REST APIs\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cimg src=\"\u002Fassets\u002Fexternal\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002Fassets\u002Fapplication.png\" \u002F>\n\n\u003Cp>These are the changes that we must make to migrate to a serverless environment:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Database migration: Migrate the database from on-premises to MongoDB Atlas.\u003C\u002Fli>\n\u003Cli>Backend migration: Migrate the NodeJS\u002FExpress application from on-premises to an \u003Ca href=\"https:\u002F\u002Faws.amazon.com\u002Flambda\u002F\">AWS Lambda\u003C\u002Fa> function.\u003C\u002Fli>\n\u003Cli>Web app migration: Migrate the React web app from on-premises to \u003Ca href=\"https:\u002F\u002Faws.amazon.com\u002Famplify\u002F\">AWS Amplify\u003C\u002Fa>.\u003C\u002Fli>\n\u003Cli>Authentication migration: Migrate the custom-built authentication to use \u003Ca href=\"https:\u002F\u002Faws.amazon.com\u002Fcognito\u002F\">Amazon Cognito\u003C\u002Fa>.\u003C\u002Fli>\n\u003Cli>Storage migration: Migrate the local storage of images to use \u003Ca href=\"https:\u002F\u002Faws.amazon.com\u002Fs3\u002F\">Amazon S3\u003C\u002Fa> and \u003Ca href=\"https:\u002F\u002Faws.amazon.com\u002Fcloudfront\u002F\">Amazon CloudFront\u003C\u002Fa>.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>The following image shows the proposed solution for the migrated application:\u003C\u002Fp>\n\u003Cimg src=\"\u002Fassets\u002Fexternal\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002Fassets\u002Fmigrated-application.png\" \u002F>\n\n",{"title":6,"order":7},"Application overview",3,"Our example application is a [MERN](https:\u002F\u002Fwww.mongodb.com\u002Fmern-stack) application. The original (legacy) application is hosted on two different servers: one contains the Mongo database and another contains the Node\u002FJS\u002FExpress and ReactJS applications.\n\n\n\u003Cimg src=\"\u002Fassets\u002Fexternal\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002Fassets\u002Farch-diagram.png\"\u002F>\n\nThe 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](https:\u002F\u002Faws.amazon.com\u002Fwhat-is\u002Frestful-api\u002F).\n\n\u003Cimg src=\"\u002Fassets\u002Fexternal\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002Fassets\u002Fapplication.png\" \u002F>\n\nThese are the changes that we must make to migrate to a serverless environment:\n\n- Database migration: Migrate the database from on-premises to MongoDB Atlas.\n- Backend migration: Migrate the NodeJS\u002FExpress application from on-premises to an [AWS Lambda](https:\u002F\u002Faws.amazon.com\u002Flambda\u002F) function.\n- Web app migration: Migrate the React web app from on-premises to [AWS Amplify](https:\u002F\u002Faws.amazon.com\u002Famplify\u002F).\n- Authentication migration: Migrate the custom-built authentication to use [Amazon Cognito](https:\u002F\u002Faws.amazon.com\u002Fcognito\u002F).\n- Storage migration: Migrate the local storage of images to use [Amazon S3](https:\u002F\u002Faws.amazon.com\u002Fs3\u002F) and [Amazon CloudFront](https:\u002F\u002Faws.amazon.com\u002Fcloudfront\u002F).\n\nThe following image shows the proposed solution for the migrated application:\n\n\u003Cimg src=\"\u002Fassets\u002Fexternal\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002Fassets\u002Fmigrated-application.png\" \u002F>\n\n",[10],"content\u002Fcontributors\u002Fmarcia-villalba.json","LESSON","Lift and shift a web app to serverless","\u002Fcontent\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002F3-application-overview","1 min",[16,36,45,50,59,68,77,87,96,105,113,122,130],{"title":17,"content":18},"Introduction",[19],{"title":17,"order":20,"youtubeVideoID":21,"learningGoals":22,"resources":27,"time":32,"path":33,"id":34,"link":35},1,"O-hSs7aF7JE",[23,24,25,26],"Understand what lift and shift migrations are","Understand the benefits of serverless architecture","Learn how to migrate applications and databases from serverful to serverless","Learn patterns for migrating your services onto AWS.",[28],{"link":29,"text":30,"type":31},"https:\u002F\u002Fblog.marcia.dev\u002Flift-and-shift-a-web-app-to-serverless#heading-requirements-for-migration","Lift and shift to Serverless","text","2 min","1-introduction","1-introduction.md","\u002Fcontent\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002F1-introduction",{"title":37,"content":38},"Guide",[39],{"title":40,"order":41,"time":14,"path":42,"id":43,"link":44},"Requirements for migration",2,"2-requirements-for-migration","2-requirements-for-migration.md","\u002Fcontent\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002F2-requirements-for-migration",{"title":-1,"content":46},[47],{"title":6,"order":7,"time":14,"path":48,"id":49,"link":13},"3-application-overview","3-application-overview.md",{"title":-1,"content":51},[52],{"title":53,"order":54,"youtubeVideoID":55,"time":14,"path":56,"id":57,"link":58},"Database migration",4,"Mic2TGzzVXk","4-database-migration","4-database-migration.md","\u002Fcontent\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002F4-database-migration",{"title":-1,"content":60},[61],{"title":62,"order":63,"youtubeVideoID":64,"time":32,"path":65,"id":66,"link":67},"Backend migration",5,"MvVaFPCdiZY","5-backend-migration","5-backend-migration.md","\u002Fcontent\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002F5-backend-migration",{"title":-1,"content":69},[70],{"title":71,"order":72,"youtubeVideoID":73,"time":32,"path":74,"id":75,"link":76},"Web app migration",6,"gQn4XPfpdZE","6-webapp-migration","6-webapp-migration.md","\u002Fcontent\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002F6-webapp-migration",{"title":-1,"content":78},[79],{"title":80,"order":81,"youtubeVideoID":82,"time":83,"path":84,"id":85,"link":86},"Authentication and authorization migration",7,"KRnZvbVT7uk","3 min","7-authentication-and-authorization-migration","7-authentication-and-authorization-migration.md","\u002Fcontent\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002F7-authentication-and-authorization-migration",{"title":-1,"content":88},[89],{"title":90,"order":91,"youtubeVideoID":92,"time":32,"path":93,"id":94,"link":95},"Storage migration",9,"Z4frDpp4PcM","8-storage-migration","8-storage-migration.md","\u002Fcontent\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002F8-storage-migration",{"title":-1,"content":97},[98],{"title":99,"order":100,"youtubeVideoID":101,"time":14,"path":102,"id":103,"link":104},"Testing this application",11,"U_7xD-o5mCA","9-testing-this-application","9-testing-this-application.md","\u002Fcontent\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002F9-testing-this-application",{"title":-1,"content":106},[107],{"title":108,"order":109,"youtubeVideoID":101,"time":32,"path":110,"id":111,"link":112},"How much does this application cost?",12,"10-pricing-of-migrated-application","10-pricing-of-migrated-application.md","\u002Fcontent\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002F10-pricing-of-migrated-application",{"title":-1,"content":114},[115],{"title":116,"order":117,"youtubeVideoID":118,"time":83,"path":119,"id":120,"link":121},"Performance analysis",13,"B0pDPSQcAf4","11-performance-analysis","11-performance-analysis.md","\u002Fcontent\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002F11-performance-analysis",{"title":-1,"content":123},[124],{"title":125,"order":126,"time":14,"path":127,"id":128,"link":129},"Conclusion",14,"12-conclusion","12-conclusion.md","\u002Fcontent\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002F12-conclusion",{"title":-1,"content":131},[132],{"title":133,"order":117,"time":14,"path":134,"id":135,"link":136},"Extra resources","13-extra-resources","13-extra-resources.md","\u002Fcontent\u002Fpaved-path\u002Flift-and-shift-a-web-app-to-serverless\u002F13-extra-resources",1792578866405]