New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
S3 Direct Upload with Sigv4 #3983
Comments
Hey there, and thanks for reporting! Hmm that sounds like something is wrong with your own setup, but this is not directly related to the code of Sharetribe Go. Don't hesitate to discuss this with other users of the Community Edition, at https://www.sharetribe.com/community/! Possibly, someone who uses a similar infrastructure will be able to share their settings, to guide you through our own specific setup. Keep up the good work! |
Thanks for sharing! Hmm I'm not sure about the exact answer here, that indeed requires a bit more investigation. We'll have a look in the upcoming days, most likely next week. Stay tuned! |
Indeed, Go currently uses v2 signatures for S3 uploads: https://github.com/sharetribe/sharetribe/blob/master/app/services/s3_uploader.rb#L62 Uploads will only work in S3 regions that were launched before 2014, such as us-east-1, eu-west-1, etc. Until we release an update that support v4 signatures, you can workaround this issue by using an older S3 region. |
I added support for v4 signatures for S3 uploads for some projects that use S3 Bucket in Europe and Asia since there is no support for v2 signatures. I can try to send a pull request soon. |
@EugeneKey can u share a gist with the fix for us? So we can use right now until you can accomplish the PR. Thanks for now! |
Just update your app/services/s3_uploader.rb: |
Sharetribe Version:
https://github.com/sharetribe/sharetribe/tree/6cb337f45f7ba6fc64f7078fa5f72edbdd302076
Environment:
AWS EC2, Ubuntu 18
node v10.16.3
npm 6.9.0
Server mode:
production
Description:
Can not direct upload image to AWS S3 , error message The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256
Steps To Reproduce:
Step 1: Access New/Edit Listing page
Step 2: Upload images
Expected result: 200
Actual result: 400 with error message The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256
Additional information
s3_region: 'ca-central-1'
The text was updated successfully, but these errors were encountered: