Unable to add photo file to S3 bucket

I currently have an S3 resource configured to add photo files to an S3 bucket.

The resource is fully connected and okay when tested (picture below).

Also, it seems that in my query to add the photo file, all fields are properly pulling in to the query config (photo below).

There are two core issues:

  1. When I press preview, I simply get a "failed to fetch" error with no additional information.

  2. When I run the query, I just get an "S3 Upload Error: ____" return error code.

Does anyone have an idea on how to troubleshoot / fix this?

Screenshot 2024-09-09 at 10.53.25 AM

Hi @zbh45 ,

Everything seems correctly set up on the Retool side, but you may need to adjust a few settings in AWS.

First, please check if the CORS policy for your S3 bucket is configured to allow Retool access to write or modify data. You can find more info here: Connect to Amazon S3 and S3-compatible services | Retool Docs

Also, for Retool to add or modify objects in your bucket, it needs permission to perform the s3:PutObject action. Without this permission in your S3 bucket policy, Retool won't be able to upload files.

The "Create Access Credentials" section on that page has an example of the required policy. You can also find more examples of bucket policies here: Examples of Amazon S3 bucket policies - Amazon Simple Storage Service

Hope this helps! Let me know if you need more details.