PHP scripts and codes from $6

How To Serve Amazon S3 Images Via CloudFlare CDN


Amazon S3 is a cloud file storage. i personally use it to store this blog images and some of my personal files. Amazon s3 work hand in hand with Amazon Cloudfront, since i was using Cloudflare free CDN, i needed to serve images from my S3 bucket via CloudFlare at a much higher speed with lower latency.

Before this can be possible, you need to have re-written your Amazon s3 URL to a subdomain by creating a CNAME record in your CloudFlare website DNS Zone.
Follow the steps below to learn how to serve s3 images via CloudFlare CDN.

  • Login to your Cloudflare and navigate to your website DNS Settings
    cloudflare DNS settings
  • Create a CNAME record pointing to your amazon bucket name. Guide on how to brand amazon s3 url to your sub domain can be found here.
    Below image is how i changed my s3 URL to “s3.tech4sky.com” by setting up a CNAME in my cloudflare DNS zone.
    CloudFlare CNAME record
  • To serve the image through CloudFlare CDN, click the cloud symbol as shown in the image below to accelerate traffic and serve s3 images via CloudFlare.
    CloudFlare accelerate icon
  • On clicking, the symbol will change to the image below, which signifies cloudflare is now activated to serve your Amazon s3 images.
    CloudFlare activated



Don’t Want To Miss Our Update, Subscribe Now
About collizo4sky

Agbonghama Collins is a webdeveloper and an internet geek. I love writing and sharing the little idea & information i know. Hope you enjoyed my Article.

You can get in touch with him via these modes: Follow him on Twitter, add him on Facebook or on Google+

I Learn Web Design, Coding, Business & More.