How to upload to AWS S3 directly from browser using a pre-signed URL instead of credentials?

后端 未结 7 1145
天命终不由人
天命终不由人 2020-12-08 03:07

We\'d like to use Javascript AWS SDK to upload files to S3, but without using credentials at all. Uploading using credentials works, but we cannot generate an AWS IAM user f

相关标签:
7条回答
  • 2020-12-08 03:35

    I could suggest two approaches:

    1- You could generate a pre-signed form in your app, with one credential

    See doc: http://docs.aws.amazon.com/AmazonS3/latest/dev/HTTPPOSTForms.html

    2- You could use web identity federation and use login with google, facebook or amazon:

    See doc: http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/browser-configuring-wif.html

    Playground: http://aws.typepad.com/aws/2013/08/the-aws-web-identity-federation-playground.html

    0 讨论(0)
提交回复
热议问题