I am building a full stack Nodejs, Express.js and React application with a file upload functionality.
What will be the best approach to upload the file?
1. Upload the file from frontend to S3? 2. First upload the file to backend and then upload the file from backend to S3?
What will be the best option? In my opinion the first approach is better as it doesn't require extra load on backend if the file is larger, but I am not sure about the security issues to keep the AWS credentials in the frontend code.
Any suggestions are welcome :)
https://docs.aws.amazon.com/AmazonS3/latest/userguide/Presig...
Worth taking a look at the AWS WAF (Well-Architected Framework) as this will give you some AWS-approved architecture ideas.