Delivering media on S3/Cloudfront using signed URLs is not working
Does anyone have any experience serving media files on S3/Cloudfront using signed URLs?
I am a developer who is building a podcast hosting service and my feeds are passing validation tests and also work in the Overcast podcast app. I'm having a really hard time getting them to work with the Apple Podcast Directory and the Podcast app.
The crux of the problem is figuring out how to serve media files that need to be accessed through signed URLs on Cloudfront. Signed URLs allow you to securely distribute private content, see: https://advancedweb.hu/how-s3-signed-urls-work/
Initially, I used the signed URLs directly in my feeds, which worked fine in Overcast, but not in the Apple Podcast app. I think it's because the Apple Podcast Directory was providing cached versions of my feed, and since the links expire after 1 hour, they were no longer valid when the Podcast App tried to download them. This is just my theory because I do not know how to find out what the actual problem was. All I know is that the podcast app could not load the files.
So I changed the feed to deliver URLs to media files that are a 302 redirect to the signed URL on Cloudfront. My theory is that the podcast app will follow the 302 redirects, which will create a new signed URL that has not expired. However, the Apple Podcast Directory will not validate my feeds with these 302 redirect links. I get the error "Can’t download episodes from your feed." Again, Overcast has no problem and the feeds validate fine.
Since the artwork is also using a signed URL and the 302 redirect, I get the error " Podcast artwork must be between 1400 x 1400 and 3000 x 3000 pixels, JPG or PNG, in RGB color space, and hosted on a server that allows HTTP head requests." I assume it's because the redirect link doesn't include the file extension.
I feel like I'm shooting with my eyes closed. I have ideas that I can try, but I don't have any documentation, and I can't dig any deeper with the Apple Podcast Directory to find out exactly why things are failing.
Any help is greatly appreciated! Also, if there are any docs/resources I should know about, please advise. Thank you!