سؤال

I have a design question and am hoping for some validation. I want to create a 'serverless' web app which will parse a csv file and return an XML file.

I will have a single page react app hosted in AWS S3, where a user can drag and drop a file, and it will be parsed and the contents of the csv file will be sent to a lambda, which will then convert it to an XML file and return this to the user.

I am hoping not to have to use S3 to store the csv and resulting xml file but I can if that is needed.

Is this possible without a server or am I way off?

هل كانت مفيدة؟

المحلول

Yes, this will work. I've done a SPA out of file storage with API services on Azure recently.

You will need to configure CORS on the client and the lambda. The browser will consider the API request cross-origin because it's not going to the site where it got the HTML from.

You likely will need a form of external authentication like OAuth/OpenID Connect

A code sample can be found here

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى softwareengineering.stackexchange
scroll top