0

Does AWS s3 js upload sdk files directly from browser to s3 bucket? I am currently using the Php SDK I uploaded the files to the server first and then uploaded them to the s3 bucket but this process consumes too much resources I could not find an example on the web I'm waiting for your help

1 Answer 1

1

You can upload files directly from your browser using AWS S3 JavaScript SDK.

  • One approach is to implement a mechanism to request for temporary access credentials directly or indirectly from AWS STS to assume an AWS IAM role that allows S3 upload.

  • Another approach is to generate AWS S3 Presigned Post using AWS S3 SDK from a backend that sends temporary access credentials to upload content to a private bucket.

For more details check the Examples: Browser-Based Upload using HTTP POST (Using AWS Signature Version 4)

Sign up to request clarification or add additional context in comments.

4 Comments

Hello there thanks for your answer Do you have a video for that? I think I need a very complicated video
I don't have a video for it, but just updated the answer with an example using a simpler approach using temporary access credentials.
I have written a medium article just now, it might help to implement it medium.com/@ashan.fernando/…
Thanks for the article I am starting to examine

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.