-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Golang aws sdk v2 cannot upload to supabase storage #577
Comments
I try to use Golang aws sdk v1, and I could upload object normally |
Hi there, thanks for opening. We cannot guarantee compatibility across all SDKs and libraries that support S3, thanks for reporting that v1 does work and that v2 does not! For now, I would suggest using v1 if possible! |
Hello the issue seems related to the new go SDK, I'll open an issue on their end and see what they think. For now a workaround that seem to work, is to remove the func removeDisableGzip() func(*middleware.Stack) error {
return func(stack *middleware.Stack) error {
_, err := stack.Finalize.Remove("DisableAcceptEncodingGzip")
return err
}
}
func main() {
ctx := context.Background()
endpoint := "https://tenant.supabase.co/storage/v1/s3"
accessKeyId := ""
secretAccessKey := ""
region := "ap-southeast-1"
sdkConfig := aws.Config{
Region: region,
BaseEndpoint: &endpoint,
Credentials: credentials.NewStaticCredentialsProvider(accessKeyId, secretAccessKey, ""),
APIOptions: []func(*middleware.Stack) error{removeDisableGzip()},
}
s3Client := s3.NewFromConfig(sdkConfig)
result, err := s3Client.ListBuckets(ctx, &s3.ListBucketsInput{})
} |
Related aws/aws-sdk-go-v2#2848 |
Thanks for your sharing |
I'm hesitant to use the workaround, since we don't know which provider(s) our end users are using or whether that would break compatibility with those. V1 is also deprecated and we started seeing other issues with it, so staying on it isn't really an option |
Would be great to get support for V2. Livekit uses this and therefore is now not compatible with Supabase storage. I'm sure lots of other services will be migrating and this will become more of a compatibility issue. |
Confirmed on my end with Supabase as well, and am getting the same problem |
Getting the same issue when using with Livekit. Have to now explore an alternative solution, but would be great to have this fixed. Goal of using Supabase for me is that I don't need to use a bunch of other services, so if we can fix this issue, I'd be able to consolidate which would be awesome. |
Bug report
Describe the bug
I got issue while using golang aws sdk v2 (github.com/aws/aws-sdk-go-v2) to integrate with supabase storage. The document said I should check again the error
SignatureDoesNotMatch
but I set access key id / access secret key / region that are all correctTo Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: