Forum Academy Marketplace Showcase Pricing Features

AWS File Uploader 403 Error

@levon I’m having another issue with the AWS uploader. I’ve followed the guide perfectly, but I’m still getting a 403 forbidden when trying to access the uploaded files. The only way to access the files from within my app is to set the principal in the bucket policy to “*” which I don’t want. I’m able to successfully upload to S3, I’m just getting a 403 when I try to view those uploaded files within my app.

I’m using the uploader and the S3 object on the page.

The png file should appear next to the URL in this repeating group:

I feel like theres something missing from this guide:

ie. it feels like what is explained in this guide is that my bucket policy grants permission to my Cognito UnAuth role and not my actual bubble app. I can’t even view the file on S3 when I click on the object URL because I don’t have permission (i can view it from my bucket by clicking “open”). How do I essentially make my bubble app the “principal” on the S3 bucket policy? I feel like the bucket needs to be public but limited to my app.

I’m also using a CORS policy that has allowed origin set to my bubble app URL as specified in the guide.

I’ve also tried using other bucket policy examples like Restricting Access to a Specific HTTP Referrer as documented here:

I feel like I’m missing something…

Unfortunately it’s not possible to limit the access to the S3 bucket only from your app. Bubble doesn’t give dedicated IPs, otherwise this could have been possible.

So my only option is to make the uploaded files completely public?

i’m afraid yes,

Hello, i’m in the same situation
did you find a solution by any chance ?