This is a tip about speeding up your website access. The idea is to put some heavy assets in another server and give access to them with a remote url from your server’s pages. So, your website will concentrate in providing the essential data while the heavy lifting, like images or media, is distributed by another server.

By doing that, you are actually building a Content Delivery Network (CDN).

Here goes a classy way to do it with the excellent Amazon S3 service.


1. Create your account

Obviously, you will need an account to proceed.

Got to the Amazon s3 site and create your account as described there.

In this example we are going to use Amazon S3’s buckets to store the files we need. So I created a bucket specific for this in my Amazon S3 account.

The files in your CDN could come from somewhere else than Amazon S3. Amzon would just create the CDN for those files even if not stored in Amazon S3.

Realy, in this first step you should have your account created on AWS and some files stored or on a Amazon S3 bucket or in a reachable machine.

Then click this :Start the cloudfront wizard

Follow the wizard


you must select the delivery method. Since I’m going to use it for images I wont use streaming. Use it for videos or music if you need to.

Choose a delivery method


Step 2 : Choose the origin of the file

Since I choose to use Amazon S3 buckets, there goes my config.

step2 - Choose the source

Step3: Amazon will cache your content

step3 - Set the cache

I left the default settings.

Step 4 : Review and create

There is an intermediary step where you can use CNAMES in order to use one of your domain or subdomain to map this CDN. In that case you will also have to configure your domain or subdomain DNS on your server configuration.

Otherwise, leave it blank.

Use a CNAME for your CDN


step4 - Review and create



Step5: Now go on and test your content in a browser

Just type the URL of your recently CDN (or CNAME if you’ve settled it up) with the name of the file you’ve stored away. It should appear in your browser.