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.
Most Important Features
- Serving static content like images
- Serve HLS videos with signed cookies
- Serve the content without any latency
Return on Investment
- CloudFront offers monthly 1 TB free bandwidth so I suppose many companies not have to pay anything in their initial period
- After 1 TB, CloudFront could be costly (0.1 usd/GB), price could be different depending on the region but the speed we get with CLoudFront which makes totally worth it
Other Software Used
Ezoic, HubSpot CRM, ActiveCampaign, DigitalOcean Droplets, Amazon S3 (Simple Storage Service), A2 Hosting, Zoho Mail, Google Sheets, Telegram, Discord




