Can I use CDN with Amazon S3?
Yes, you can use Amazon Simple Storage Service (S3) in the same way as any other origin server. Just use your Amazon S3 domain, e.g. s3.eu-central-1.amazonaws.com as the Origin Domain of your CDN Static/CDN Video services.
Accept-Ranges HTTP header
For pseudo streaming via CDN Static services and for CDN Video services please make sure that your Amazon S3 origin responds with the following HTTP header.
Accept-Ranges: bytes
How can I check that my Amazon S3 responds with "Accept-Ranges: bytes" HTTP header?
You can use curl or curl online.
curl -I http://s3.eu-central-1.amazonaws.com/my-bucket/my-video.mp4
You should see the "Accept-Ranges: bytes" HTTP header in the curl response.
What if my Amazon S3 does not respond with "Accept-Ranges: bytes" HTTP header?
You can use our CDN Static Push/CDN Video Push services because they come with our storage as origin and our storages are configured to respond with "Accept-Ranges: bytes" HTTP header. Or you can manually add the header in your S3 Management Console.
Adding custom HTTP headers in S3 Management Console
- Log in to your S3 Management Console and open your Bucket.
- Right-click on your video file as in the picture below.
- In the Metadata section click on the "Add more metadata" and add your custom HTTP header as in the picture below.
- Click on the "Save" button.
- That's all
Now use curl or curl online and make sure that your custom HTTP header is present in the curl response.
Please note that in the case of HTTP header "Accept-Ranges: bytes" the header is (from some reason) not saved in S3 Management Console but the important part is that it is present in the curl response.