https://www.growthbook.io/ logo
h

helpful-carpenter-3208

03/08/2022, 7:06 AM
Hi, when I try to upload screenshots to experiment, I got this CORS error. I configured to access our S3 bucket. what else I need to configure?
f

fresh-football-47124

03/08/2022, 7:15 AM
interesting
can you share the headers?
h

helpful-carpenter-3208

03/08/2022, 7:24 AM
I solved this by add CORS settings in the s3 bucket. but then I got the new error when calling upload URL
f

fresh-football-47124

03/08/2022, 7:32 AM
hrmm, hard to tell where that is coming from
h

helpful-carpenter-3208

03/08/2022, 7:35 AM
Copy code
<Error>
<Code>SignatureDoesNotMatch</Code>
<Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>
I got this error…
my initial guess is this related with these 2 setting? I just makeup 2 random string to set these 2 env values. Am’I wrong?
@fresh-football-47124 I suggest you to change the s3 upload using the v4 version https://github.com/aws/aws-sdk-js/issues/1213#issuecomment-259261766
Copy code
var s3 = new AWS.S3({signatureVersion: 'v4'});
f

fresh-football-47124

03/08/2022, 7:54 AM
okay, thanks Herb, we'll take a look at this tomorrow, shouldn't be hard
1
h

helpful-carpenter-3208

03/10/2022, 6:20 AM
@fresh-football-47124 Any update on this one?
f

fresh-football-47124

03/10/2022, 6:52 AM
I spoke to Jeremy about it, he was still looking into it
I'll make a note to work on it tomorrow
1
f

future-teacher-7046

03/10/2022, 10:35 AM
@helpful-carpenter-3208 Does your AWS bucket policy require a specific signature version? According to the docs, both v2 and v4 and allowed by default unless you restrict the signature version in the bucket policy. https://docs.aws.amazon.com/AmazonS3/latest/API/bucket-policy-s3-sigv4-conditions.html
I see, looks like v2 is deprecated and any new buckets created only support v4. I'll update our api to use v4 when signing the url.
h

helpful-carpenter-3208

03/10/2022, 11:00 AM
Cool~ Thanks for investigate this!
f

future-teacher-7046

03/10/2022, 11:11 AM
Just pushed. New docker build will be available in about 10 minutes
👍 1
h

helpful-carpenter-3208

03/11/2022, 4:48 AM
Hi, @future-teacher-7046 I can see you have made the change and it indeed use the v4 signed url. but I’m still got 400 error…
I’m wondering if something else I’m missing on our bucket
f

fresh-football-47124

03/11/2022, 4:57 AM
is it just through Growthbook?
can you access the files directly?
h

helpful-carpenter-3208

03/11/2022, 5:00 AM
Yes, it’s through our selfhosted growthbook. the file is not uploaded to our s3 bucket.
this 400 request is mean to upload the file to s3. but got 400
f

fresh-football-47124

03/11/2022, 5:01 AM
i see
if you want to DM me the S3 permissions/config, I can check it against our config
1
a

average-garage-91345

03/24/2022, 11:17 PM
I am running into this exact issue, was there a solution to it?
🙌 1
f

fresh-football-47124

03/24/2022, 11:29 PM
HI Loren
sorry, wrong link
2 Views