My 2 Years Experience with CloudFront
Use Cases and Deployment Scope
We use Amazon CloudFront to serve static media content like (images & videos) to users. We wanted a solution to serve static content without latency and AWS CloudFront addressed this problem. CloudFront also helps to deliver HLS videos to users. With CloudFront, we can sign the URL and server to users with this feature URL gets expired after a certain time and if someone embedded our content then it would be inaccessible. If you want to serve HLS videos then I suggest using signed cookies instead of signed URL. With signed cookies, we do not need to append an authentication token on each URL and it gets authenticated through cookies that pass on each network call.
Pros
- Serving HLS Videos with CloudFron Signed Cookies
- Serving Static content on the website
- Helps to hide your S3 bucket url in public
- Deliver files without any latency
- Easy to get usage statistics and logs
- Add settings to prevent access of any particular file type
Cons
- Integration of CloudFront Signed Cookies is difficult can provide better documentation
- Adding custom domain is tricky sometime because we have to create certificate first and region should be N. Virginia otherwise you will not see the certificate while attaching in CloudFront settings. I think there is need of improvement here.
- Setting CloudFront for different file type, I find difficulty when I was integrating it
- I guess CloudFront has all the features which any CDN should have. Only a better documentation is required. Currently it is really overwhelm.
Likelihood to Recommend
Amazon CloudFront is the perfect solution for any type of company. If a company is small or medium size, CloudFront offers 1 TB monthly free bandwidth which is more than for any small and medium size companies. If we compare the speed of CloudFront with other CDN, CloudFront is way ahead of their competitors and with 1 TB free bandwidth. If someone is ready to invest time in CloudFront documentation then he/she definitely go for it.