-4

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?

4
  • If this is posted in the wrong place let me know Commented Jan 6, 2020 at 17:38
  • What does the Lambda do (besides change the data format)?
    – Dan Wilson
    Commented Jan 6, 2020 at 19:10
  • Do you have file read write permissions on the users computer in your setup? Commented Jan 6, 2020 at 19:49
  • The lambda would convert the file to XML but I'm guessing I could do all this client side with JS. Commented Jan 6, 2020 at 21:39

1 Answer 1

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.