-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple errors when Cloudfront signed URL is configured in amplify #15
Comments
Did you find a solution to this? |
I believe you have to use signed cookies instead of signed url. The signed url give you access to the m3u8 file, but not all subsequent files. |
Signed URL is working fine in Chrome(Mac & Android) but not on Safari (Mac) and all browsers on iPhone. Is this a limitation with VideoJs? Wondering if any other commercial video player is available that can support signed S3 URLs. Also, anyone verified if Signed Cookies are working across all browsers? |
I"m having the exact same issue, in that the secure url can read the list m3u8 file ( via curl, or nodejs + hls.js programatically), but as soon as the individual stream file is selected, it either a) 403 forbidden (via curl) or b) No 'Access-Control-Allow-Origin' I've spent almost 2 days, fully checking everything, from CloudFront Behaviours / Whitelist config, to S3 bucket policy for the arn for the cloudfront user. everything looks fine. HELP pleasse |
The tutorial/lab set this up all with signed urls. And the ReactJS client app, using the Cognito user that i'm using via node programatically to authenticate, does not have CORS issues, and can stream the individual .m3u8 content files without a 403. So i'm not convinced the setup is wrong, or how would the ReactJS client, stream the videos securely, fine, without 403 or CORS... but something is missing from my understanding, and testing, using curl and nodeJS + hls.js ... cause i see the exact same as others above here |
The fix listed here is working fine on Chrome (Mac and Android), unfortunately not on any of iOS browsers and Safari (Mac). I guess the reason being is it's not invoking |
I've refactored my code again, used a ReactJS video upload/download sample code, that works - and am now at the safari blocker regarding the options not being parsed by safari to see the security options. sigh |
I have this fully solved, and working now for Chrome and Safari / iOS based browsers. coles notes: |
solution walk through posted https://stackoverflow.com/a/64988224/1207732 let me know if you need any further assistance |
it doesn't work across browsers with just signed urls, or signed cookies. For me, i server the signed url(s) but issue cookies based on the urls at the same time, so both Safari/iOS and the rest of the browsers are happy. See https://stackoverflow.com/a/64988224/1207732 for my attempted walk through of my solution that i finally engineered. |
let me know if https://stackoverflow.com/a/64988224/1207732 helps you out |
@roblittle I have followed the same instructions on AWS console and tried to implement the same on JS + PHP but still, the video does not play: I set headers in PHP like this: header('Access-Control-Allow-Credentials: true'); Here is the JS code:
I also confirmed that signed cookies are setting in the browser without any issue. I tried to access the image file through the same CloudFront distribution and it is a working file. Also, I am able to download m3u8 file, However video does not play also cookies don't send in the request header too. Can you please guide me on what I am doing wrong? Thanx in advance. |
@roblittle I've also followed the detailed guide and wasn't able to play the video. This is asking too much, but would it be possible for you to record a video on youtube for your approach? Thank you so much! |
@tsenguunchik I resolved it, there was some CORS policy issue. mail me at [email protected] and I will help you as I hardly visit here. |
When Cloudfront signed url is configured in "amplify video add" section, after completing all the steps in the workshop, there are multiple errors while viewing the video.
Access to XMLHttpRequest at 'https://xyz.cloudfront.net/output/sampleVideo.m3u8' from origin 'http://ec2-public-ip:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
GET https://xyz.cloudfront.net/output/sampleVideo.m3u8 403 (Forbidden)
It seems like the app is not getting the signed cloudfront url.
After some debugging in lambda console I tried getting the cloudfront signed url but it gives me
"Error>
AccessDenied
Access Denied
some-request-id
Any help is highly appreciated as I'm trying to help my customer adopt this solution.
The text was updated successfully, but these errors were encountered: