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

powerful-dream-22266

06/20/2022, 7:41 PM
Hello!! I'm having trouble configuring the webhook to upload on s3. When I configure the webhook I get the response: "POST returned an invalid status code: 412" I'm using the endpoint: https://MYBUCKET.s3.amazonaws.com/ I have the variables enabled in docker-compose: AWS_ACCESS_KEY_ID = <ID> AWS_SECRET_ACCESS_KEY = <SECRET> S3_BUCKET = <MYBUCKET> S3_REGION = us-east-1 UPLOAD_METHOD = s3 S3_DOMAIN = <https://MYBUCKET.s3.amazonaws.com/>* I don't know if I need to enable the S3_DOMAIN variable but it is enabled When I test a PUT via POSTMAN I can upload it normally with AWS credentials.
f

fresh-football-47124

06/20/2022, 7:42 PM
I've not seen a 412 before - looking into it
p

powerful-dream-22266

06/20/2022, 7:52 PM
Ok, thanks!
f

fresh-football-47124

06/20/2022, 7:54 PM
this is for self hosting for file storage in s3?
p

powerful-dream-22266

06/20/2022, 7:57 PM
Yes
Using webhook on growthbook
f

fresh-football-47124

06/20/2022, 7:58 PM
p

powerful-dream-22266

06/20/2022, 7:59 PM
Yes, I already checked that, I'll try to take a print screen
Attach
Configuration of S3 and the ECS variables
f

future-teacher-7046

06/20/2022, 8:19 PM
In order to use S3 with Webhooks, you'll need to use a Lambda function in between. You can't point to S3 directly
Our webhooks post a JSON object containing all of the feature definitions. You'll need to use Lambda (or similar) to parse that data and call the S3 api to store it
p

powerful-dream-22266

06/20/2022, 8:27 PM
OK. If you can make a suggestion to make this more visible in the documentation because we understood that it was enough to configure the variables in docker-compose.
Do you have any examples or documentation of this execution via lambda?
f

future-teacher-7046

06/20/2022, 9:06 PM
The S3 variables in docker-compose are for something different. That's for when someone uploads an image in the GrowthBook UI (e.g. in a comment or feature description)
4 Views