Mern Stack AWS s3

Viewed 83

Hi I'm looking to implement aws s3 storage bucket for images for a mern project that a user can upload and set as profile picture and create posts with images, my question how do I go about doing this on the the back end I want the user to be able to make all the crud operations, this will be my first time using aws so any help would be great

1 Answers

While you could have your React front-end interact with S3 directly using something like S3 pre-signed URLs (1), it may be difficult to get the CRUD functionality you want in your front-end.

A set of AWS lambda functions for the CRUD operations would be the best approach if your backend architecture is serverless. Otherwise, your nodejs backend can manage S3 get/update/delete functions for your front-end.

References:

  1. https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html)
Related