How to Drupal 7, CDN Module, and Amazon Cloudfront in 10 minutes

Recently I decided to check out Amazon Cloudfront to use as a cdn. I had a delighted experience with it. It was so easy to setup with drupal and configured so easy in just a few steps.

Cloudfront is a pull only cdn as opposed to a push cdn. A pull cdn is a cdn that grabs the files from your site on demand. The only thing you have to do to configure a pull cdn, is switch out the base url of the files you want to serve, to the cdn base url. When that file gets requested the cdn checks if it has it already, if not it downloads it from your server and servers it to the client.

In addition to the easy setup of Amazon Cloud front is it's cost. It is really really cheap. It costs about 12 cents per gigabite of transfer.

Step 1: Create a Cloudfront distrabution

I am not going to walk through the sign up process for amazon web services. It is pretty straight forward you can find it here. Once you have an account you need to sign in to the AWS Management Console. The link is found on aws.amazon.com website at top right hand side.

Next you will get the Management Console for all AWS services. Click on the Cloudfront tab.

Next click the 'Create Distribution' button in the upper left hand side.

You will be prompted with a small configuration screen. Click on 'Custom Origin' and enter your website domain name in 'Origin DNS Name' field and click 'Continue'. NOTE: This is the most basic setup. This can definetly be more complex, but for most users this configuration will work.

On the next configuation screen you can leave everything blank. You can optionally configure a cname. This will allow you to control the url of your cdn. For example, if you wanted everything to come from cdn.example.com you would enter that in, but be aware that you need to configure your DNS appropiatly. Again for most setups you can leave this blank. Click 'Continue'.

Finally you will be brought to the review page, hit 'Create Distribution'.

Next make note of the 'Domain Name' that was assign to you. It should be something.cloudfront.net. It may take a few minutes for the distribution to create it self, but while that is going on, you can install the cdn modle.

Once enabled, there is only two simple configuations that you need to do. Go to /admin/config/development/cdn and click on the details tab. In the 'CDN-mapping' textarea paste in the url you got from cloudfront and remeber to put http in front of it and click save.

Lastly, click the 'General' tab at the top right hand corner and check the box to enable CDN.

Thats it! Now all files on your site will be pulled automatically to the cdn and be servered to the world from the closed location.

NOTE: This will cause almost all files to be pulled from the CDN, even javascript files. If you have javascript files that are making AJAX requests, they will not work, because you can not do cross domain ajax calls. So make sure to black list those files. You can also choose to blacklist other files as well in the cdn configuration.

999 We are undecided when they are enough to prevent a pedicab driver, but we've not yet positioned a great deal of of our self esteem within their palms.. Internet based TutorialsLet's experience it, a great deal of of us please don't provide the time or dough make use of hair dressers, authentic louis vuitton outlet store make-up artists and stylists on even an occasional basis.
discount cheap green bay packers jerseys http://www.socialdo.org/greenbaypackersjerseys/

Hey blog owner, I've seen that you're not ranking very high in Google or any seach engine for that mannter.
I just wanted to let you know that you can change this and get massive traffic to your blog at any time.
Check it out here.
http://bit.ly/1atEP01
My webpage; psp themes

999 We're unsure should they be plenty of to halt a pedicab driver, but we have not yet put a great deal of our self worth of their fingers.. Internet TutorialsLet's encounter it, most of us you shouldn't possess the time or wealth to utilize hair dressers, artsy gm louis vuitton bagshop louis vuitton belts makeup artists and stylists on even an occasional basis.
wholesale nba jerseys http://www.spokanesouthie.com/wholesale-nba-jerseys-c-1.html

Amazon CloudFront is a web service for content delivery . It makes it easier for you to distribute content to end users quickly, with low latency and high data transfer speeds. Amazon CloudFront delivers your content through a worldwide network of edge locations. End users are routed to the nearest edge location, so content is delivered with the best possible performance. Amazon CloudFront works seamlessly with the Amazon Simple Storage Service (Amazon S3), which durably stores the original, definitive versions of your files.
Try Bucket Explorer my very own tool..It makes handling of files at S3 and cloud front easier...

Thanks for writing about the CDN module :) I wasn't aware of the existence of the article, so I wrote a similar, but more complete blog post on the same subject. You were using 2.0-beta1, but now we're at version 2.5. It can do much more, optimizes even more aspects and provides a much better overall experience.
See http://wimleers.com/article/easy-drupal-cdn-integration-for-fun-and-profit

In the past people use to drink a glass of milk when they were struggling
with their heartburn. While antacids can help ease the burning sensation, they only neutralize stomach acid
and provide temporary relief. The instant reaction to heartburn pain and discomfort - to
reach for the heartburn remedy you bought at the drug store or supermarket.
Stop by my weblog ... Aciddietreflux.wetpaint.com

I got this all set up on my sight but I noticed it has lowered my first byte time. Also is there a way to use this with the image resize filter? I host a lot of my photos on my site from smugmug.com and I'd like them to recompress and upload to the CDN since smugmug doesn't compress the photos very much. But I get errors every so often in the common.ini or something like that. Any advice? My site is at http://alikgriffin.com

I have followed the instructions of this phantastic tutorial, activated the CDN module and connected with Amazon. All worked fine until I marked "Far Future expiration". Then, that note appeared:" Potentially problematic domains: dqt...cloudfront.net uses the same web server as this Drupal site." I think that it is the same case that was explained here, a server where Drupal itself is installed and working that also serve pages to Amazon, isn't it?
Luis

Hello there! Do you know if they make any plugins to help with Search Engine Optimization?
I'm trying to get my blog to rank for some targeted keywords but I'm not seeing very
good results. If you know of any please share.
Thanks!
Feel free to surf to my web site: Myntra cashback