I'm building a web app in which I need to let users upload documents to their account and also read all the documents they have uploaded. In addition, I would like to allow users to be able to upload a profile photo as well. To handle file storage, I chose AWS S3.
However, I'm having a lot of trouble with the SDK (v3). Bear in mind I never used the previous version (v2). I installed 2 packages via npm, @aws-sdk/client-s3 and @aws-sdk/s3-request-presigner
. I'm having trouble finding proper documentation for all the functionality I need. The docs I have come across are not exactly beginner friendly and don't go into a lot of detail explaining all the functionality. For example, in the case of GetObjectCommand, I am able to get a response but I'm unsure about how to actually tap into the Body and use the contents.
I'm also unsure about whether I should be using GetObjectCommand or getSignedUrl for my use case. For context, I'm using Express to build my server.
My questions -
- Is there any easier way to interact with S3 for my app rather than using the SDK? By easier I just mean properly documented.
- Am I looking at the wrong documentation? Are there other resources that make this simpler?
- What are the situations where one would use
getSignedUrloverGetObjectCommandto read and then render stored files for a web app?
I will be extremely grateful for any and all help.