<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Erzwan.com &#187; amazon</title>
	<atom:link href="http://erzwan.com/category/amazon/feed" rel="self" type="application/rss+xml" />
	<link>http://erzwan.com</link>
	<description>How-to Tech Guide</description>
	<lastBuildDate>Wed, 18 Aug 2010 12:00:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Amazon CloudFront – How To Setup CloudFront To Work With S3</title>
		<link>http://erzwan.com/amazon-cloudfront-%e2%80%93-how-to-setup-cloudfront-to-work-with-s3.html</link>
		<comments>http://erzwan.com/amazon-cloudfront-%e2%80%93-how-to-setup-cloudfront-to-work-with-s3.html#comments</comments>
		<pubDate>Fri, 21 Nov 2008 16:33:12 +0000</pubDate>
		<dc:creator>hongkiat</dc:creator>
				<category><![CDATA[How-To Guides]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[amazon cloudfront]]></category>
		<category><![CDATA[cloudfront]]></category>
		<category><![CDATA[cname]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[integrate]]></category>
		<category><![CDATA[s3]]></category>
		<category><![CDATA[setup]]></category>

		<guid isPermaLink="false">http://www.hongkiat.com/blog/?p=3167</guid>
		<description><![CDATA[Assuming you run a high trafficked website or blog and you ran in to these [...]]]></description>
			<content:encoded><![CDATA[<p><!--INFOLINKS_OFF-->
<p>Assuming you run a high trafficked website or blog and you ran in to these following problems:</p>
<ul>
<li><strong>Slow content serving</strong> &#8211; Contents (htmls, images, download files) are serving at extremely slow speed, especially during traffic spikes</li>
<li><strong>Paid, and unused</strong> &#8211; You are paying you web host more than what you are actually utilizing. That means, you are probably paying for a <a href="http://www.hongkiat.com/blog/out/dreamhost" style=""  rel="nofollow" onmouseover="self.status='http://www.hongkiat.com/blog/out/dreamhost';return true;" onmouseout="self.status=''">web hosting</a> package with 50Gb of web space and 1Tb of bandwidth, but you are barely using half of them.</li>
<li><strong>Messy files/folders</strong> &#8211; The web account is in a mess. Images folders, download-able item folders are not properly organized.</li>
</ul>
<p>All these can be easily solved with <a href="http://aws.amazon.com/cloudfront/"><strong>Amazon CloudFront</strong></a>. <strong>CloudFront</strong> is a new service launched by Amazon, powered by <a href="http://en.wikipedia.org/wiki/Cloud_computing">cloud computing technology</a>. Using Amazon S3 as storage, CloudFront serves on top of the buckets and deliver contents at a much higher speed with lower latency. <a href="http://aws.amazon.com/cloudfront/">Click here</a> to read more.</p>
<p>If you are already using <a href="http://www.hongkiat.com/blog/amazon-s3-the-beginners-guide/">Amazon S3</a> to serve files for websites, <strong>CloudFront</strong> is really something you should check out. We&#8217;ll now guide you through setting up CloudFront to serve web files.</p>
<p><span id="more-3167"></span></p>
<ol>
<li>
<h4>First and Formost</h4>
<p>Get an <strong>Amazon S3</strong> account (<a href="http://www.hongkiat.com/blog/amazon-s3-the-beginners-guide/">read here</a>), then <a href="https://aws-portal.amazon.com/gp/aws/developer/subscription/index.html?productCode=AmazonCloudFront">sign-up</a> for an Amazon CloudFront service. Check your email to make sure the service is activated for you.</p>
<p><img src="http://media02.hongkiat.com/amazon-cloudfront/sign-up-amazon-cloudfront.jpg" width="500" height="139" title="Amazon CloudFront   How To Setup CloudFront To Work With S3" alt="sign up amazon cloudfront Amazon CloudFront   How To Setup CloudFront To Work With S3" /></p>
</li>
<li>
<h4>Create Distribution</h4>
<p>Applications you use to manage Amazon S3 buckets might varies, but we&#8217;ll try to stick to a free tool &#8211; <a href="https://addons.mozilla.org/en-US/firefox/addons/policy/0/3247/41288"><strong>S3 Firefox</strong></a>, a S3 file manager with CloudFront supported. Get connected to your account with S3 Firefox, right click on the bucket name (assuming files and folders inside here are/will be web accessible) and choose <strong>Manage Distributions</strong>.</p>
<p><img src="http://media02.hongkiat.com/amazon-cloudfront/select-manage-distribution.jpg" width="500" height="246" title="Amazon CloudFront   How To Setup CloudFront To Work With S3" alt="select manage distribution Amazon CloudFront   How To Setup CloudFront To Work With S3" /></p>
<p><strong>Distribution</strong> is an unique URL of sort that you can use to reference a file. You&#8217;ll get a better picture once it&#8217;s created. Click on <strong>Create Distribution</strong> to create your first distribution for the bucket.</p>
<p><img src="http://media02.hongkiat.com/amazon-cloudfront/create-distribution.jpg" width="500" height="327" title="Amazon CloudFront   How To Setup CloudFront To Work With S3" alt="create distribution Amazon CloudFront   How To Setup CloudFront To Work With S3" /></p>
<p>Once you&#8217;ve created, you&#8217;ll noticed a new Domain Name: <em>XXXXX.cloudfront.net</em> is being created for you. Status will turn from <strong><em>InProgress</em></strong> to <em><strong>Deployed</strong></em> when it&#8217;s done. You can also click on the Refresh button to update the status.</p>
<p>If you previous has this following asset: </p>
<ul>
<li><strong>http://media02.hongkiat.com/folder1/imageA.jpg</strong>, it now can be accessed with the URL</li>
<li><strong>http://XXXXX.cloudfront.net/folder1/imageA.jpg </strong></li>
</ul>
<p>You still can serve files with the first URL but the latter one is CloudFront powered, and it&#8217;s way faster.</p>
</li>
<li>
<h4>Create CNAME</h4>
<p>Distribution URL starts with <strong>http://XXXXX.cloudfront.net/</strong> and  we don&#8217;t think there&#8217;s any way to decide what goes before <em>.cloudfront.net</em>. However, to make the URL simplier, nice and easier to remember, we can use CNAME to map this URL to whatever we want. This requires access to web hosting control panels. In this example, we&#8217;ll show you how to map:</p>
<ul>
<li><strong>http://XXXXX.cloudfront.net/</strong> to </li>
<li><strong>http://media02.hongkiat.com/</strong></li>
</ul>
<p>If you are unfamiliar with CNAMEs, we suggest that you ask your <a href="http://www.hongkiat.com/blog/out/dreamhost" style=""  rel="nofollow" onmouseover="self.status='http://www.hongkiat.com/blog/out/dreamhost';return true;" onmouseout="self.status=''">web host</a> to do it for you. You&#8217;ll entere something similar to this, with your own distribution URL of course.</p>
<p><img src="http://media02.hongkiat.com/amazon-cloudfront/cname-edit.jpg" width="500" height="59" title="Amazon CloudFront   How To Setup CloudFront To Work With S3" alt="cname edit Amazon CloudFront   How To Setup CloudFront To Work With S3" /></p>
<p>This might take 24 hours to propagate, but in the mean time, filled up the CNAME in S3 Firefox.</p>
<p><img src="http://media02.hongkiat.com/amazon-cloudfront/cname.jpg" width="500" height="236" title="Amazon CloudFront   How To Setup CloudFront To Work With S3" alt="cname Amazon CloudFront   How To Setup CloudFront To Work With S3" /></p>
<p>Once it&#8217;s properly propagated (you can test with pinging the URL), you can serving files using <em>http://media02.hongkiat.com/*</em>.</p>
</li>
<li>
<h4>Performance Comparison</h4>
<p>We all know how fast and efficient Amazon S3 serve files, but we thought you should see a comparison after CloudFront is being implemented on top of the serving so you&#8217;ll know each and every penny spend is worthwhile. To do a fair compare of the loading speed differences, we took a blog content, load it twice; once with images hosted under <em><strong>hongkiat.s3.amazonaws.com,</strong></em> another time with images under <em><strong>static.hongkiat.com</strong></em> (CloudFront) and monitor it with <a href="http://tools.pingdom.com/">Pingdom Tools</a>. Click on images for larger view.</p>
<p><strong>hongkiat.s3.amazonaws.com &#8211; </strong>41 images loaded at 6.5 sec.</p>
<p><a href="http://media02.hongkiat.com/amazon-cloudfront/pingdom-amazons3-large.jpg" ><img src="http://media02.hongkiat.com/amazon-cloudfront/pingdom-amazons3.jpg" width="500" height="420" title="Amazon CloudFront   How To Setup CloudFront To Work With S3" alt="pingdom amazons3 Amazon CloudFront   How To Setup CloudFront To Work With S3" /></a></p>
<p><strong>static.hongkiat.com</strong> (CloudFront)- 41 images loaded at 3.5 sec.</p>
<p><strong><a href="http://media02.hongkiat.com/amazon-cloudfront/pingdom-cloudfront-large.jpg" ><img src="http://media02.hongkiat.com/amazon-cloudfront/pingdom-cloudfront.jpg" width="500" height="428" title="Amazon CloudFront   How To Setup CloudFront To Work With S3" alt="pingdom cloudfront Amazon CloudFront   How To Setup CloudFront To Work With S3" /></a></strong></p>
</li>
</ol>
<p><!--INFOLINKS_OFF--></p>
]]></content:encoded>
			<wfw:commentRss>http://erzwan.com/amazon-cloudfront-%e2%80%93-how-to-setup-cloudfront-to-work-with-s3.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
