0

I am using python3.9 and boto3. I have had success creating presigned urls for objects in a bucket with public access turned completely on. I basically cloned another bucket for use of objects that I don't want public accessibility for, but still want to be able to generate a presigned url for others with that url to access.

To make sure there is no confusion at this point:

  • I have a bucket that has no public access
  • I want to create presigned urls for objects in it
  • The bucket policy permits it

Inside of this bucket, I have 2 folders. One with images and the other with woff files. I can create presigned for both, but when I try to use the urls to load them on a html page, only the images load. All of the woffs return a 403 error on the client side.

Any idea as to why this would be the case? Is cross-origin the culprit here?

Thank you!

Shmack
  • 1,015
  • 1
  • 11
  • 18
  • If you click on a woff presigned url does it download it? – cosmic_inquiry Apr 21 '22 at 06:35
  • @cosmic_inquiry if I travel to the url it prompts to download it – Shmack Apr 21 '22 at 18:53
  • I'd try pointing to presigned url like so https://stackoverflow.com/a/43497951/8927098. Also look at https://stackoverflow.com/a/52893219/8927098. Sounds like it could be a CORS issue. https://enable-cors.org/index.html – cosmic_inquiry Apr 21 '22 at 19:41
  • I am leaning more towards it not being a cors issue, due to error code 403 being returned... typically it says in console that it was, but I was uncertain as to if AWS just like to send 403s if the access-control header was missing. Due to your stackoverflow post in your comment, I think that I can rule that out. As for the other, it says to use the matching protocol for your links. So they were trying to load http links when their server was serving on https. The presigned url is https, and I am running https. Although my certificate from aws says its invalid. That might be it... – Shmack Apr 21 '22 at 20:30

0 Answers0