<?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>Phil Chen &#187; Cloud Computing</title>
	<atom:link href="http://www.philchen.com/category/cloud-computing/feed" rel="self" type="application/rss+xml" />
	<link>http://www.philchen.com</link>
	<description>Phil Chen</description>
	<lastBuildDate>Fri, 23 Jul 2010 03:36:53 +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>16 Million Objects Totaling 61 Terabytes – Yes, We Believe Amazon S3 Can Scale!</title>
		<link>http://www.philchen.com/2010/06/16/16-million-objects-totaling-61-terabytes-%e2%80%93-yes-we-believe-amazon-s3-can-scale</link>
		<comments>http://www.philchen.com/2010/06/16/16-million-objects-totaling-61-terabytes-%e2%80%93-yes-we-believe-amazon-s3-can-scale#comments</comments>
		<pubDate>Wed, 16 Jun 2010 18:18:58 +0000</pubDate>
		<dc:creator>Phil Chen</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>

		<guid isPermaLink="false">http://www.philchen.com/?p=616</guid>
		<description><![CDATA[As Director of Systems Engineering for VMIX, it is my job—my department&#8217;s job—to scale our infrastructure to meet our clients&#8217; needs, ensuring a high level of service availability and performance.
And each year that goes by, our online video platform usage grows at a pace that could give anyone an ulcer, especially if you don’t come [...]]]></description>
			<content:encoded><![CDATA[<p>As Director of Systems Engineering for <a href="http://www.vmix.com" target="_blank">VMIX</a>, it is my job—my department&#8217;s job—to scale our infrastructure to meet our clients&#8217; needs, ensuring a high level of service availability and performance.</p>
<p>And each year that goes by, our online video platform usage grows at a pace that could give anyone an ulcer, especially if you don’t come up with a creative solution to scale.<br />
<span id="more-616"></span><br />
One of the solutions VMIX implemented <a href="http://www.vmix.com/blog/2009/09/walking-into-the-cloud-extending-our-mission-critical-datacenter-with-cloud-services/" target="_blank">a little over a year ago</a> was incorporating cloud-based storage for a segment of our infrastructure. After much R&amp;D, we chose to partner with the <a href="http://aws.amazon.com/s3/" target="_blank">Amazon S3</a> service. When we started incorporating S3 to help meet some of our storage needs, we were slightly concerned about the service&#8217;s reliability and performance. So our approach was to design a system that would leverage our classic storage model as a buffer or cache for short-term newer content, and utilize S3 for long-term older content.</p>
<p>One year later, I thought I would share our findings with actual data collected from Amazon S3, as well as from the VMIX platform.</p>
<p>The graph below shows three data points (data stored, data transferred in, and data transferred out) on a month-to-month basis. As you will see, we did not experience any limitations on the amount of data stored and the amount of data transferred in and out.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="620" height="500" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashVars" value="dataUrl=http://www.mygraphs.com/data/vmix/vmix_1.1.xml" /><param name="bgcolor" value="#D3D3D3" /><param name="quality" value="high" /><param name="src" value="http://www.mygraphs.com/bin/swf/vmix/vmixs3.swf" /><param name="flashvars" value="dataUrl=http://www.mygraphs.com/data/vmix/vmix_1.1.xml" /><embed type="application/x-shockwave-flash" width="620" height="500" src="http://www.mygraphs.com/bin/swf/vmix/vmixs3.swf" quality="high" bgcolor="#D3D3D3" flashvars="dataUrl=http://www.mygraphs.com/data/vmix/vmix_1.1.xml"></embed></object></p>
<p>The graph below tracks how many individual objects VMIX stored on a month-to-month basis. Given S3’s object-store model, it was clear that having two buckets in S3 was more than enough to handle what we needed.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="620" height="500" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashVars" value="dataUrl=http://www.mygraphs.com/data/vmix/vmix_1.2.xml" /><param name="bgcolor" value="#D3D3D3" /><param name="quality" value="high" /><param name="src" value="http://www.mygraphs.com/bin/swf/vmix/vmixs3.swf" /><param name="flashvars" value="dataUrl=http://www.mygraphs.com/data/vmix/vmix_1.2.xml" /><embed type="application/x-shockwave-flash" width="620" height="500" src="http://www.mygraphs.com/bin/swf/vmix/vmixs3.swf" quality="high" bgcolor="#D3D3D3" flashvars="dataUrl=http://www.mygraphs.com/data/vmix/vmix_1.2.xml"></embed></object></p>
<p>The graph below shows the number of transactions on a month-to-month basis. We found that every time we stored, deleted or retrieved an object the performance was very dependable.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="620" height="500" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashVars" value="dataUrl=http://www.mygraphs.com/data/vmix/vmix_1.3.xml" /><param name="bgcolor" value="#D3D3D3" /><param name="quality" value="high" /><param name="src" value="http://www.mygraphs.com/bin/swf/vmix/vmixs3.swf" /><param name="flashvars" value="dataUrl=http://www.mygraphs.com/data/vmix/vmix_1.3.xml" /><embed type="application/x-shockwave-flash" width="620" height="500" src="http://www.mygraphs.com/bin/swf/vmix/vmixs3.swf" quality="high" bgcolor="#D3D3D3" flashvars="dataUrl=http://www.mygraphs.com/data/vmix/vmix_1.3.xml"></embed></object></p>
<p>In conclusion, with the right architecture, Amazon S3 is an excellent option to help you scale storage. Though performance isn’t perfect (in the past year we&#8217;ve seen three to four S3 outages lasting an average of 15 minutes each) we feel you can architect around that as we have.</p>
<p>During this initial period VMIX used Amazon for a segment of its storage needs only—we now feel confident increasing our use of S3 moving forward.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.philchen.com/2010/06/16/16-million-objects-totaling-61-terabytes-%e2%80%93-yes-we-believe-amazon-s3-can-scale/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amazon EC2 64-bit CentOS 5.3 Base Public AMI &#8217;s</title>
		<link>http://www.philchen.com/2010/05/31/amazon-ec2-64bit-centos-5-3-base-public-ami-s</link>
		<comments>http://www.philchen.com/2010/05/31/amazon-ec2-64bit-centos-5-3-base-public-ami-s#comments</comments>
		<pubDate>Tue, 01 Jun 2010 01:01:45 +0000</pubDate>
		<dc:creator>Phil Chen</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>

		<guid isPermaLink="false">http://www.philchen.com/?p=597</guid>
		<description><![CDATA[I have had a lot of people request me to make a public base CentOS 5.3 64-bit EC2 AMI in all the AWS Regions. I can understand some of you would like to fire up a base instance and then make modifications and snapshot them into your own custom AMI&#8217;s. So I finally found some [...]]]></description>
			<content:encoded><![CDATA[<p>I have had a lot of people request me to make a public base CentOS 5.3 64-bit EC2 AMI in all the AWS Regions. I can understand some of you would like to fire up a base instance and then make modifications and <a href="http://www.philchen.com/2009/05/19/how-to-save-a-snapshot-of-your-amazon-ec2-instance">snapshot</a> them into your own custom AMI&#8217;s. So I finally found some time to build some and here they are! You can find them from the AWS EC2 Management Console under Public AMI&#8217;s or via command line methods.<br />
<span id="more-597"></span><br />
<strong>United States:</strong></p>
<p><strong>Virginia</strong> – ami-b945acd0<br />
<strong>California</strong> – ami-498cdd0c</p>
<p><strong>United Kingdom:</strong></p>
<p><strong>Ireland</strong> – ami-993d17ed</p>
<p><strong>Asia Pacific:</strong></p>
<p><strong>Singapore</strong> – ami-45e29d17</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.philchen.com/2010/05/31/amazon-ec2-64bit-centos-5-3-base-public-ami-s/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What is The Throughput For an Amazon EC2 Instance?</title>
		<link>http://www.philchen.com/2009/06/05/what-is-the-bandwidth-throughput-for-ec2</link>
		<comments>http://www.philchen.com/2009/06/05/what-is-the-bandwidth-throughput-for-ec2#comments</comments>
		<pubDate>Sat, 06 Jun 2009 00:02:01 +0000</pubDate>
		<dc:creator>Phil Chen</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>

		<guid isPermaLink="false">http://www.philchen.com/?p=499</guid>
		<description><![CDATA[Since bandwidth throughput when using Amazon Web Services Elastic Compute Cloud (EC2) is very important when routing traffic and services I decided to take some measurements and outline them here for your reference. I ran tests against both 32 Bit and 64 Bit instances, and found some interesting results. These tests were run several times [...]]]></description>
			<content:encoded><![CDATA[<p>Since bandwidth throughput when using <a href="http://aws.amazon.com/ec2/">Amazon Web Services Elastic Compute Cloud (EC2)</a> is very important when routing traffic and services I decided to take some measurements and outline them here for your reference. I ran tests against both 32 Bit and 64 Bit instances, and found some interesting results. These tests were run several times over different days, and the figures are the averages I saw.<br />
<span id="more-499"></span></p>
<blockquote><p><em>*Remember Results May Vary</em></p></blockquote>
<p><strong>Methods of Transport:</strong><br />
SCP &#038; CURL</p>
<p><strong>Data File Size:</strong><br />
17 Megabytes</p>
<p><strong>Data Center Bandwidth:</strong><br />
Gigabit (RoutesScience)</p>
<p><strong> </p>
<blockquote><p>SCP Data:</p></blockquote>
<p></strong></p>
<blockquote><p><strong>32 Bit CentOS</strong></p></blockquote>
<li>Data Center &#8211;> EC2 32 = 10 megabit/s &#8211; 12 megabit/s</li>
<li>EC2 32  &#8211;> Data Center = 7.2 megabit/s</li>
<li>EC2 32 &#8211;> EC2 32 = 80 megabit/s &#8211; 96 megabit/s</li>
<blockquote><p><strong>64 Bit CentOS</strong></p></blockquote>
<li>Data Center &#8211;> EC2 = 12 megabit/s &#8211; 16 megabit/s</li>
<li>EC2 &#8211;> Data Center = 2.24 megabit/s &#8211; 3 megabit/s</li>
<li>EC2 &#8211;> EC2 = 240 megabit/s</li>
<p><strong> </p>
<blockquote><p>CURL (GET NON SSL) Data:</p></blockquote>
<p> </strong></p>
<blockquote><p><strong>32 Bit CentOS</strong></p></blockquote>
<li>Data Center (Server Running Apache) &#8211;GET&#8211;> EC2 = 3.7 megabit/s</li>
<li>EC2 (Running Apache) &#8211;GET&#8211;> Data Center = 5.7 megabit/s</li>
<li>EC2 (Running Apache) &#8211;GET&#8211;> EC2 32 = 80 megabit/s &#8211; 288 megabit/s</li>
<blockquote><p><strong>64 Bit CentOS</strong></p></blockquote>
<li>Data Center (Server Running Apache) &#8211;GET&#8211;> EC2 = 9.6 megabit/s</li>
<li>EC2 (Running Apache) &#8211;GET&#8211;> Data Center = 7.2 megabit/s</li>
<li>EC2 (Running Apache) &#8211;GET&#8211;> EC2 = 767 megabit/s</li>
]]></content:encoded>
			<wfw:commentRss>http://www.philchen.com/2009/06/05/what-is-the-bandwidth-throughput-for-ec2/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Save a Snapshot of your Amazon EC2 Instance</title>
		<link>http://www.philchen.com/2009/05/19/how-to-save-a-snapshot-of-your-amazon-ec2-instance</link>
		<comments>http://www.philchen.com/2009/05/19/how-to-save-a-snapshot-of-your-amazon-ec2-instance#comments</comments>
		<pubDate>Tue, 19 May 2009 23:53:29 +0000</pubDate>
		<dc:creator>Phil Chen</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>

		<guid isPermaLink="false">http://www.philchen.com/?p=405</guid>
		<description><![CDATA[This how to article will go over saving a snapshot of your Amazon Elastic Compute Cloud (EC2) Machine Image (AMI). This is very useful for taking an existing AMI and modifying it to customize your needs into a new separate AMI. 
For my intents and purposes I have a base CentOS 5.3 AMI with only [...]]]></description>
			<content:encoded><![CDATA[<p>This how to article will go over saving a snapshot of your Amazon Elastic Compute Cloud (EC2) Machine Image (AMI). This is very useful for taking an existing AMI and modifying it to customize your needs into a new separate AMI. </p>
<p>For my intents and purposes I have a base CentOS 5.3 AMI with only the bare essentials. I then use this snapshot method to create different class AMI&#8217;s for different server functions ie. (webserver, memcached server, etc)<br />
<span id="more-405"></span><br />
First thing is first you are going to need to have an existing AMI created, you can read how to do so in my other blog article <a href="http://www.philchen.com/2009/02/14/how-to-create-an-amazon-elastic-compute-cloud-ec2-machine-image-ami">How to create an Amazon Elastic Compute Cloud EC2 Machine Image (AMI)</a>. Once you have this AMI created and you launch the instance the fun begins to modify it and then take a snapshot for a new AMI based on the original AMI.</p>
<p>So once you launch your instance off your base AMI, you simply connect to your Amazon EC2 instance and install all the software you need to serve your purpose as you would any other server. After you have completed all the software installs and customizations, you then can begin the snapshot process.</p>
<p>The first step is to create a directory and download the Amazon EC2 Tools</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>EC2TOOLS
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>EC2TOOLS
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.philchen.com<span style="color: #000000; font-weight: bold;">/</span>wp-content<span style="color: #000000; font-weight: bold;">/</span>uploads<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span><span style="color: #000000; font-weight: bold;">/</span>05<span style="color: #000000; font-weight: bold;">/</span>ec2-ami-tools.zip
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">unzip</span> ec2-ami-tools.zip
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> ec2-ami-tools-<span style="color: #000000;">1.3</span>-<span style="color: #000000;">31780</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">*</span> ..<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">rmdir</span> ec2-ami-tools-<span style="color: #000000;">1.3</span>-<span style="color: #000000;">31780</span><span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Now scp over your AWS private and public certificate</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>EC2TOOLS<span style="color: #000000; font-weight: bold;">/</span>pk-yourprivatekey.pem
<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>EC2TOOLS<span style="color: #000000; font-weight: bold;">/</span>cert-yourcertificate.pem</pre></div></div>

<p>You want to setup your .bashrc to know where your tools are</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">vi</span> ~<span style="color: #000000; font-weight: bold;">/</span>.bashrc
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$PATH</span>:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>sbin
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">EC2_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>EC2TOOLS
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">source</span> ~<span style="color: #000000; font-weight: bold;">/</span>.bashrc</pre></div></div>

<p>Now you will want to download the correct kernel modules:</p>
<p>If your creating a snapshot of a 32bit AMI and don&#8217;t have the proper xen kernel modules do the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>MOD
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>MOD
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.philchen.com<span style="color: #000000; font-weight: bold;">/</span>wp-content<span style="color: #000000; font-weight: bold;">/</span>uploads<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span><span style="color: #000000; font-weight: bold;">/</span>05<span style="color: #000000; font-weight: bold;">/</span>kernel-modules2616-xenu.tgz
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">gunzip</span> <span style="color: #660033;">-c</span> kernel-modules2616-xenu.tgz <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xvf</span> -
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>MOD<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mv</span> 2.6.16-xenU <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ depmod <span style="color: #660033;">-ae</span> 2.6.16-xenU</pre></div></div>

<p>If your creating a snapshot of a 64bit AMI and don&#8217;t have the proper xen kernel modules do the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>MOD
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>MOD
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.philchen.com<span style="color: #000000; font-weight: bold;">/</span>wp-content<span style="color: #000000; font-weight: bold;">/</span>uploads<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span><span style="color: #000000; font-weight: bold;">/</span>05<span style="color: #000000; font-weight: bold;">/</span>kernel-modules-<span style="color: #000000;">261633</span>-xenu.tgz
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">gunzip</span> <span style="color: #660033;">-c</span> kernel-modules-<span style="color: #000000;">261633</span>-xenu.tgz <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xvf</span> -
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>MOD<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mv</span> 2.6.16.33-xenU <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ depmod <span style="color: #660033;">-ae</span> 2.6.16.33-xenU</pre></div></div>

<p>Now you will want to create a location to store the image files</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>EC2IMAGE</pre></div></div>

<p>At this step you are ready to create the EC2 image files and upload them to S3</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>EC2TOOLS
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ bin<span style="color: #000000; font-weight: bold;">/</span>ec2-bundle-vol <span style="color: #660033;">-d</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>EC2IMAGE <span style="color: #660033;">--privatekey</span> pk-yourprivatekey.pem <span style="color: #660033;">--cert</span> cert-yourcertificate.pem <span style="color: #660033;">-u</span> amazonaccountnumber <span style="color: #660033;">-r</span> i386 or x86_64 <span style="color: #660033;">-p</span> imagename
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ec2instance<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ bin<span style="color: #000000; font-weight: bold;">/</span>ec2-upload-bundle <span style="color: #660033;">-b</span> yours3bucketname <span style="color: #660033;">-m</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>EC2IMAGE<span style="color: #000000; font-weight: bold;">/</span>whatever.manifest.xml <span style="color: #660033;">-a</span> accesskeyid <span style="color: #660033;">-s</span> secretaccesskey</pre></div></div>

<p>Now on your local machine that you start instances from register the new AWS AMI</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>phil<span style="color: #000000; font-weight: bold;">@</span>client<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>phil<span style="color: #000000; font-weight: bold;">/</span>EC2<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ec2-register yourbucketname<span style="color: #000000; font-weight: bold;">/</span>thenameofthenewami.manifest.xml</pre></div></div>

<p>At this point you are done, and ready to fire up your new AMI instance whenever you like with your changes. Note the below directories have been excluded during the bundle process so your certs and secret info will be excluded, but also note anything you installed in these directories will not be kept though as well.</p>
<p>Excluding:<br />
	 /sys<br />
	 /proc<br />
	 /dev/pts<br />
	 /proc/sys/fs/binfmt_misc<br />
	 /dev<br />
	 /media<br />
	 /mnt<br />
	 /proc<br />
	 /sys<br />
	 /mnt</p>
<p>Happy snapshotting your AMI <img src='http://www.philchen.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.philchen.com/2009/05/19/how-to-save-a-snapshot-of-your-amazon-ec2-instance/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How long does it take to launch an Amazon EC2 instance?</title>
		<link>http://www.philchen.com/2009/04/21/how-long-does-it-take-to-launch-an-amazon-ec2-instance</link>
		<comments>http://www.philchen.com/2009/04/21/how-long-does-it-take-to-launch-an-amazon-ec2-instance#comments</comments>
		<pubDate>Wed, 22 Apr 2009 05:08:20 +0000</pubDate>
		<dc:creator>Phil Chen</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>

		<guid isPermaLink="false">http://www.philchen.com/?p=368</guid>
		<description><![CDATA[As part of a project to offset usage spikes by auto spinning up EC2 instances on the fly for added computing power during high traffic periods, I needed to answer the question how fast could I really spin up an EC2 instance. So after running several tests against small and large EC2 instances running a [...]]]></description>
			<content:encoded><![CDATA[<p>As part of a project to offset usage spikes by auto spinning up EC2 instances on the fly for added computing power during high traffic periods, I needed to answer the question how fast could I really spin up an EC2 instance. So after running several tests against small and large EC2 instances running a base CentOS 5.3 AMI this is what I found:<br />
<span id="more-368"></span><br />
<strong>Small Instance 1.7 GB of memory, 1 EC2 Compute Unit (1 virtual core with 1 EC2 Compute Unit), 160 GB of instance storage, 32-bit platform with a base install of CentOS 5.3 AMI</strong></p>
<p>Amount of time from launch of instance to availability:<br />
Between 5 and 6 minutes us-east-1c</p>
<p><strong>Large Instance 7.5 GB of memory, 4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each), 850 GB of instance storage, 64-bit platform with a base install of CentOS 5.3 AMI</strong></p>
<p>Amount of time from launch of instance to availability:<br />
Between 11 and 18 minutes us-east-1c</p>
<p>Both were started via command line using Amazons tools.</p>
<p>Given my research instances are not so instant, so in order to accommodate for the delay calculating your usage patterns is key to avoid the gap. Having a reserve set of instances running as a buffer to carry you over the delay of launching new instances during peak load times is a must. By knowing your usage patterns you can at least make an educated decision as to how many instances you will need in the buffer. Also a system of seeing load acceleration against running capacity will be important for auto launching instances as necessary given your determined algorithm.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.philchen.com/2009/04/21/how-long-does-it-take-to-launch-an-amazon-ec2-instance/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What is The Throughput For Pushing Files to Amazon S3?</title>
		<link>http://www.philchen.com/2009/04/06/what-is-the-throughput-for-pushing-files-to-amazon-s3</link>
		<comments>http://www.philchen.com/2009/04/06/what-is-the-throughput-for-pushing-files-to-amazon-s3#comments</comments>
		<pubDate>Mon, 06 Apr 2009 11:59:46 +0000</pubDate>
		<dc:creator>Phil Chen</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>

		<guid isPermaLink="false">http://www.philchen.com/?p=326</guid>
		<description><![CDATA[So recently I wanted to test how fast it would take to push a large amount of data into the Amazon S3 Cloud Computing Service. I already had an idea of the throughput, but wanted to make sure with a large amount of data over time my assumption was correct.

SPECIFICATIONS:
Amount of Data: 165.85895 gigabytes
Average File [...]]]></description>
			<content:encoded><![CDATA[<p>So recently I wanted to test how fast it would take to push a large amount of data into the <a href="http://aws.amazon.com/s3/">Amazon S3 Cloud Computing Service</a>. I already had an idea of the throughput, but wanted to make sure with a large amount of data over time my assumption was correct.<br />
<span id="more-326"></span><br />
SPECIFICATIONS:</p>
<p>Amount of Data: 165.85895 gigabytes<br />
Average File Size of Data: 4.5 megabytes<br />
ISP Connection Speed: 45 megabit connection<br />
Method: Single Threaded Process</p>
<p>RESULTS:</p>
<p>Amount: 165.85895 gigabytes<br />
Time to completion: 19.06775 hours<br />
Throughput: 22.31 megabit/second average</p>
<p><img src="http://www.philchen.com/wp-content/uploads/2009/04/amazonthruputimage.png" alt="amazonthruputimage" title="amazonthruputimage" width="602" height="258" class="alignleft size-full wp-image-327" /></p>
<p>CONCLUSION:</p>
<p>I have consistently seen on average 22 megabit/s speeds for pushing files onto S3. Occasionally I have seen the fastest speeds at around 35 megabit/s. This test helps bolster that, looks like Amazon rate limits it to this range.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.philchen.com/2009/04/06/what-is-the-throughput-for-pushing-files-to-amazon-s3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create an Amazon Elastic Compute Cloud EC2 Machine Image (AMI)</title>
		<link>http://www.philchen.com/2009/02/14/how-to-create-an-amazon-elastic-compute-cloud-ec2-machine-image-ami</link>
		<comments>http://www.philchen.com/2009/02/14/how-to-create-an-amazon-elastic-compute-cloud-ec2-machine-image-ami#comments</comments>
		<pubDate>Sat, 14 Feb 2009 23:52:30 +0000</pubDate>
		<dc:creator>Phil Chen</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>

		<guid isPermaLink="false">http://www.philchen.com/?p=92</guid>
		<description><![CDATA[(UPDATED: 05/31/2010)
This how to article will go over creating a Amazon Elastic Compute Cloud (EC2) Machine Image (AMI) from scratch. In this particular example we are creating a Centos 5.3 64bit AMI from beginning to end. For those that are interested in taking advantage of cloud computing, hopefully you find this blog article helpful. Note [...]]]></description>
			<content:encoded><![CDATA[<p>(UPDATED: 05/31/2010)</p>
<p>This how to article will go over creating a Amazon Elastic Compute Cloud (EC2) Machine Image (AMI) from scratch. In this particular example we are creating a Centos 5.3 64bit AMI from beginning to end. For those that are interested in taking advantage of cloud computing, hopefully you find this blog article helpful. Note this blog also can be generalized for Centos 5, 5.1, 5.2 most versions of Redhat, and Fedora 64bit and 32bit.</p>
<p>First thing is first you are going to need to sign up for an Amazon Web Services account specifically S3 Storage and EC2 Elastic Compute Cloud <a href="http://aws.amazon.com">here</a>. You will need a credit card and some basic info, and will immediately get the following info:<span id="more-92"></span></p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">AWS Account Number
S3 KEY &quot;yourkeynumber&quot;
S3 SECRET KEY &quot;yoursecretkey&quot;
EC2 PRIVATE KEY &quot;pk-yourprivatekey.pem&quot;
EC2 CERTIFICATE &quot;cert-yourcertificate.pem&quot;</pre></div></div>

<p>You will need to work off of a server with the same distro you would like your image to be in my case that would be Centos 5 also note you will want to work on a server with enough disk space to create and image on.</p>
<p>Time to login become root and go to town:</p>
<p>Put your two .pem files the cert and pk in the directory ~/.ec2</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ec2</pre></div></div>

<p>Create some directories to work from and put your working files in make sure its on your largest partition in my case its /opt.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2AMIFILES
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2TOOLS
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2AMIIMAGE
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2YUM</pre></div></div>

<p>Download and extract the Amazon AMI tools into the /opt/EC2TOOLS you should have subdirectories that look like /opt/EC2TOOLS/bin etc&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2TOOLS
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>s3.amazonaws.com<span style="color: #000000; font-weight: bold;">/</span>ec2-downloads<span style="color: #000000; font-weight: bold;">/</span>ec2-ami-tools.zip
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">unzip</span> ec2-ami-tools.zip
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> ec2-ami-tools-<span style="color: #000000;">1.3</span>-<span style="color: #000000;">31780</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">*</span> ..<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">rmdir</span> ec2-ami-tools-<span style="color: #000000;">1.3</span>-<span style="color: #000000;">31780</span><span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Setup your .bashrc file to have proper pathing to EC2 resources</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">vi</span> ~<span style="color: #000000; font-weight: bold;">/</span>.bashrc
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$PATH</span>:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2TOOLS<span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">EC2_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2TOOLS
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">EC2_PRIVATE_KEY</span>=~<span style="color: #000000; font-weight: bold;">/</span>.ec2<span style="color: #000000; font-weight: bold;">/</span>pk-yourprivatekey.pem
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">EC2_CERT</span>=~<span style="color: #000000; font-weight: bold;">/</span>.ec2<span style="color: #000000; font-weight: bold;">/</span>cert-yourcert.pem</pre></div></div>

<p>Enable your .bashrc settings</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">source</span> ~<span style="color: #000000; font-weight: bold;">/</span>.bashrc</pre></div></div>

<p>Create an empty file that is about 10GB where the OS files will be worked.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;"><span style="color: #000000; font-weight: bold;">if</span></span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>zero <span style="color: #007800;">of</span>=<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2AMIIMAGE<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base.img <span style="color: #007800;">bs</span>=1M <span style="color: #007800;">count</span>=<span style="color: #000000;">10240</span></pre></div></div>

<p>Create an ext3 filesystem inside the image file.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>mke2fs <span style="color: #660033;">-F</span> <span style="color: #660033;">-j</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2AMIIMAGE<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base.img</pre></div></div>

<p>Mount the image file using the loop-back option, allowing you to treat the image file as if it was a standard disk drive.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> loop <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2AMIIMAGE<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base.img <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base</pre></div></div>

<p>Prepare the empty image filesystem with paths for system devices and configuration files.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>proc
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>etc
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>dev
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>var
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lock
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lock<span style="color: #000000; font-weight: bold;">/</span>rpm
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>MAKEDEV <span style="color: #660033;">-d</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>dev <span style="color: #660033;">-x</span> console
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>MAKEDEV <span style="color: #660033;">-d</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>dev <span style="color: #660033;">-x</span> null
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>MAKEDEV <span style="color: #660033;">-d</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>dev <span style="color: #660033;">-x</span> zero</pre></div></div>

<p>Create the file fstab to store the filesystem configuration.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>fstab
&nbsp;
If you are using 64BIT use these fstab entries below
&nbsp;
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda1       <span style="color: #000000; font-weight: bold;">/</span>      ext3   defaults  <span style="color: #000000;">1</span>  <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb        <span style="color: #000000; font-weight: bold;">/</span>mnt   ext3   defaults  <span style="color: #000000;">0</span>  <span style="color: #000000;">0</span>
none            <span style="color: #000000; font-weight: bold;">/</span>proc  proc   defaults  <span style="color: #000000;">0</span>  <span style="color: #000000;">0</span>
none            <span style="color: #000000; font-weight: bold;">/</span>sys   sysfs  defaults  <span style="color: #000000;">0</span>  <span style="color: #000000;">0</span>
&nbsp;
If you are using 32BIT use these fstab entries below
&nbsp;
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda1	<span style="color: #000000; font-weight: bold;">/</span>		ext3		defaults	<span style="color: #000000;">1</span>	<span style="color: #000000;">1</span>
none		<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>pts	devpts	        <span style="color: #007800;">gid</span>=<span style="color: #000000;">5</span>,<span style="color: #007800;">mode</span>=<span style="color: #000000;">620</span>	<span style="color: #000000;">0</span>	<span style="color: #000000;">0</span>
none		<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>shm	tmpfs	        defaults	<span style="color: #000000;">0</span>	<span style="color: #000000;">0</span>
none		<span style="color: #000000; font-weight: bold;">/</span>proc		proc		defaults	<span style="color: #000000;">0</span>	<span style="color: #000000;">0</span>
none		<span style="color: #000000; font-weight: bold;">/</span>sys		sysfs		defaults	<span style="color: #000000;">0</span>	<span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda2	<span style="color: #000000; font-weight: bold;">/</span>mnt		ext3		defaults	<span style="color: #000000;">0</span>	<span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda3	swap		swap		defaults	<span style="color: #000000;">0</span>	<span style="color: #000000;">0</span></pre></div></div>

<p>Mount the image&#8217;s proc device in advance to avoid problems with using yum.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-t</span> proc none <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>proc</pre></div></div>

<p>Create a YUM config file, note please adjust version and architecture according to which version you are using.<br />
For Centos 5.3 64bit use the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2YUM<span style="color: #000000; font-weight: bold;">/</span>yum-ami.conf
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>main<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">cachedir</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>yum
<span style="color: #007800;">keepcache</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">debuglevel</span>=<span style="color: #000000;">2</span>
<span style="color: #007800;">logfile</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>yum.log
<span style="color: #007800;">pkgpolicy</span>=newest
<span style="color: #007800;">distroverpkg</span>=redhat-release
<span style="color: #007800;">tolerant</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">exactarch</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">obsoletes</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">gpgcheck</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">plugins</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">metadata_expire</span>=<span style="color: #000000;">1800</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>base<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">name</span>=CentOS-<span style="color: #000000;">5</span> - Base
<span style="color: #007800;">mirrorlist</span>=http:<span style="color: #000000; font-weight: bold;">//</span>mirrorlist.centos.org<span style="color: #000000; font-weight: bold;">/</span>?<span style="color: #007800;">release</span>=<span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">arch</span></span>=x86_64<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">repo</span>=os
<span style="color: #666666; font-style: italic;">#baseurl=http://mirror.centos.org/centos/5/os/x86_64/</span>
<span style="color: #007800;">gpgcheck</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">gpgkey</span>=<span style="color: #c20cb9; font-weight: bold;">file</span>:<span style="color: #000000; font-weight: bold;">///</span>etc<span style="color: #000000; font-weight: bold;">/</span>pki<span style="color: #000000; font-weight: bold;">/</span>rpm-gpg<span style="color: #000000; font-weight: bold;">/</span>RPM-GPG-KEY-CentOS-<span style="color: #000000;">5</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#released updates </span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>updates<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">name</span>=CentOS-<span style="color: #000000;">5</span> - Updates
<span style="color: #007800;">mirrorlist</span>=http:<span style="color: #000000; font-weight: bold;">//</span>mirrorlist.centos.org<span style="color: #000000; font-weight: bold;">/</span>?<span style="color: #007800;">release</span>=<span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">arch</span></span>=x86_64<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">repo</span>=updates
<span style="color: #666666; font-style: italic;">#baseurl=http://mirror.centos.org/centos/5/updates/x86_64/</span>
<span style="color: #007800;">gpgcheck</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">gpgkey</span>=<span style="color: #c20cb9; font-weight: bold;">file</span>:<span style="color: #000000; font-weight: bold;">///</span>etc<span style="color: #000000; font-weight: bold;">/</span>pki<span style="color: #000000; font-weight: bold;">/</span>rpm-gpg<span style="color: #000000; font-weight: bold;">/</span>RPM-GPG-KEY-CentOS-<span style="color: #000000;">5</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#packages used/produced in the build but not released</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>addons<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">name</span>=CentOS-<span style="color: #000000;">5</span> - Addons
<span style="color: #007800;">mirrorlist</span>=http:<span style="color: #000000; font-weight: bold;">//</span>mirrorlist.centos.org<span style="color: #000000; font-weight: bold;">/</span>?<span style="color: #007800;">release</span>=<span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">arch</span></span>=x86_64<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">repo</span>=addons
<span style="color: #666666; font-style: italic;">#baseurl=http://mirror.centos.org/centos/5/addons/x86_64/</span>
<span style="color: #007800;">gpgcheck</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">gpgkey</span>=<span style="color: #c20cb9; font-weight: bold;">file</span>:<span style="color: #000000; font-weight: bold;">///</span>etc<span style="color: #000000; font-weight: bold;">/</span>pki<span style="color: #000000; font-weight: bold;">/</span>rpm-gpg<span style="color: #000000; font-weight: bold;">/</span>RPM-GPG-KEY-CentOS-<span style="color: #000000;">5</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#additional packages that may be useful</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>extras<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">name</span>=CentOS-<span style="color: #000000;">5</span> - Extras
<span style="color: #007800;">mirrorlist</span>=http:<span style="color: #000000; font-weight: bold;">//</span>mirrorlist.centos.org<span style="color: #000000; font-weight: bold;">/</span>?<span style="color: #007800;">release</span>=<span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">arch</span></span>=x86_64<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">repo</span>=extras
<span style="color: #666666; font-style: italic;">#baseurl=http://mirror.centos.org/centos/5/extras/x86_64/</span>
<span style="color: #007800;">gpgcheck</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">gpgkey</span>=<span style="color: #c20cb9; font-weight: bold;">file</span>:<span style="color: #000000; font-weight: bold;">///</span>etc<span style="color: #000000; font-weight: bold;">/</span>pki<span style="color: #000000; font-weight: bold;">/</span>rpm-gpg<span style="color: #000000; font-weight: bold;">/</span>RPM-GPG-KEY-CentOS-<span style="color: #000000;">5</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#additional packages that extend functionality of existing packages</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>centosplus<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">name</span>=CentOS-<span style="color: #000000;">5</span> - Plus
<span style="color: #007800;">mirrorlist</span>=http:<span style="color: #000000; font-weight: bold;">//</span>mirrorlist.centos.org<span style="color: #000000; font-weight: bold;">/</span>?<span style="color: #007800;">release</span>=<span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">arch</span></span>=x86_64<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">repo</span>=centosplus
<span style="color: #666666; font-style: italic;">#baseurl=http://mirror.centos.org/centos/5/centosplus/x86_64/</span>
<span style="color: #007800;">gpgcheck</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">enabled</span>=<span style="color: #000000;">0</span>
<span style="color: #007800;">gpgkey</span>=<span style="color: #c20cb9; font-weight: bold;">file</span>:<span style="color: #000000; font-weight: bold;">///</span>etc<span style="color: #000000; font-weight: bold;">/</span>pki<span style="color: #000000; font-weight: bold;">/</span>rpm-gpg<span style="color: #000000; font-weight: bold;">/</span>RPM-GPG-KEY-CentOS-<span style="color: #000000;">5</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#contrib - packages by Centos Users</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>contrib<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">name</span>=CentOS-<span style="color: #000000;">5</span> - Contrib
<span style="color: #007800;">mirrorlist</span>=http:<span style="color: #000000; font-weight: bold;">//</span>mirrorlist.centos.org<span style="color: #000000; font-weight: bold;">/</span>?<span style="color: #007800;">release</span>=<span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">arch</span></span>=x86_64<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">repo</span>=contrib
<span style="color: #666666; font-style: italic;">#baseurl=http://mirror.centos.org/centos/5/contrib/x86_64/</span>
<span style="color: #007800;">gpgcheck</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">enabled</span>=<span style="color: #000000;">0</span>
<span style="color: #007800;">gpgkey</span>=<span style="color: #c20cb9; font-weight: bold;">file</span>:<span style="color: #000000; font-weight: bold;">///</span>etc<span style="color: #000000; font-weight: bold;">/</span>pki<span style="color: #000000; font-weight: bold;">/</span>rpm-gpg<span style="color: #000000; font-weight: bold;">/</span>RPM-GPG-KEY-CentOS-<span style="color: #000000;">5</span></pre></div></div>

<p>If you are creating a 32bit Centos 5 create the following YUM config file instead:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>main<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">cachedir</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>yum
<span style="color: #007800;">keepcache</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">debuglevel</span>=<span style="color: #000000;">2</span>
<span style="color: #007800;">logfile</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>yum.log
<span style="color: #007800;">pkgpolicy</span>=newest
<span style="color: #007800;">distroverpkg</span>=redhat-release
<span style="color: #007800;">tolerant</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">exactarch</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">obsoletes</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">gpgcheck</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">plugins</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">metadata_expire</span>=<span style="color: #000000;">1800</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>base<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">name</span>=CentOS-<span style="color: #000000;">5</span> - Base
<span style="color: #007800;">mirrorlist</span>=http:<span style="color: #000000; font-weight: bold;">//</span>mirrorlist.centos.org<span style="color: #000000; font-weight: bold;">/</span>?<span style="color: #007800;">release</span>=<span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">arch</span></span>=i386<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">repo</span>=os
<span style="color: #666666; font-style: italic;">#baseurl=http://mirror.centos.org/centos/5/os/i386/</span>
<span style="color: #007800;">gpgcheck</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">gpgkey</span>=<span style="color: #c20cb9; font-weight: bold;">file</span>:<span style="color: #000000; font-weight: bold;">///</span>etc<span style="color: #000000; font-weight: bold;">/</span>pki<span style="color: #000000; font-weight: bold;">/</span>rpm-gpg<span style="color: #000000; font-weight: bold;">/</span>RPM-GPG-KEY-CentOS-<span style="color: #000000;">5</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#released updates </span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>updates<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">name</span>=CentOS-<span style="color: #000000;">5</span> - Updates
<span style="color: #007800;">mirrorlist</span>=http:<span style="color: #000000; font-weight: bold;">//</span>mirrorlist.centos.org<span style="color: #000000; font-weight: bold;">/</span>?<span style="color: #007800;">release</span>=<span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">arch</span></span>=i386<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">repo</span>=updates
<span style="color: #666666; font-style: italic;">#baseurl=http://mirror.centos.org/centos/5/updates/i386/</span>
<span style="color: #007800;">gpgcheck</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">gpgkey</span>=<span style="color: #c20cb9; font-weight: bold;">file</span>:<span style="color: #000000; font-weight: bold;">///</span>etc<span style="color: #000000; font-weight: bold;">/</span>pki<span style="color: #000000; font-weight: bold;">/</span>rpm-gpg<span style="color: #000000; font-weight: bold;">/</span>RPM-GPG-KEY-CentOS-<span style="color: #000000;">5</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#packages used/produced in the build but not released</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>addons<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">name</span>=CentOS-<span style="color: #000000;">5</span> - Addons
<span style="color: #007800;">mirrorlist</span>=http:<span style="color: #000000; font-weight: bold;">//</span>mirrorlist.centos.org<span style="color: #000000; font-weight: bold;">/</span>?<span style="color: #007800;">release</span>=<span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">arch</span></span>=i386<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">repo</span>=addons
<span style="color: #666666; font-style: italic;">#baseurl=http://mirror.centos.org/centos/5/addons/i386/</span>
<span style="color: #007800;">gpgcheck</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">gpgkey</span>=<span style="color: #c20cb9; font-weight: bold;">file</span>:<span style="color: #000000; font-weight: bold;">///</span>etc<span style="color: #000000; font-weight: bold;">/</span>pki<span style="color: #000000; font-weight: bold;">/</span>rpm-gpg<span style="color: #000000; font-weight: bold;">/</span>RPM-GPG-KEY-CentOS-<span style="color: #000000;">5</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#additional packages that may be useful</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>extras<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">name</span>=CentOS-<span style="color: #000000;">5</span> - Extras
<span style="color: #007800;">mirrorlist</span>=http:<span style="color: #000000; font-weight: bold;">//</span>mirrorlist.centos.org<span style="color: #000000; font-weight: bold;">/</span>?<span style="color: #007800;">release</span>=<span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">arch</span></span>=i386<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">repo</span>=extras
<span style="color: #666666; font-style: italic;">#baseurl=http://mirror.centos.org/centos/5/extras/i386/</span>
<span style="color: #007800;">gpgcheck</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">gpgkey</span>=<span style="color: #c20cb9; font-weight: bold;">file</span>:<span style="color: #000000; font-weight: bold;">///</span>etc<span style="color: #000000; font-weight: bold;">/</span>pki<span style="color: #000000; font-weight: bold;">/</span>rpm-gpg<span style="color: #000000; font-weight: bold;">/</span>RPM-GPG-KEY-CentOS-<span style="color: #000000;">5</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#additional packages that extend functionality of existing packages</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>centosplus<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">name</span>=CentOS-<span style="color: #000000;">5</span> - Plus
<span style="color: #007800;">mirrorlist</span>=http:<span style="color: #000000; font-weight: bold;">//</span>mirrorlist.centos.org<span style="color: #000000; font-weight: bold;">/</span>?<span style="color: #007800;">release</span>=<span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">arch</span></span>=i386<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">repo</span>=centosplus
<span style="color: #666666; font-style: italic;">#baseurl=http://mirror.centos.org/centos/5/centosplus/i386/</span>
<span style="color: #007800;">gpgcheck</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">enabled</span>=<span style="color: #000000;">0</span>
<span style="color: #007800;">gpgkey</span>=<span style="color: #c20cb9; font-weight: bold;">file</span>:<span style="color: #000000; font-weight: bold;">///</span>etc<span style="color: #000000; font-weight: bold;">/</span>pki<span style="color: #000000; font-weight: bold;">/</span>rpm-gpg<span style="color: #000000; font-weight: bold;">/</span>RPM-GPG-KEY-CentOS-<span style="color: #000000;">5</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#contrib - packages by Centos Users</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>contrib<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">name</span>=CentOS-<span style="color: #000000;">5</span> - Contrib
<span style="color: #007800;">mirrorlist</span>=http:<span style="color: #000000; font-weight: bold;">//</span>mirrorlist.centos.org<span style="color: #000000; font-weight: bold;">/</span>?<span style="color: #007800;">release</span>=<span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">arch</span></span>=i386<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">repo</span>=contrib
<span style="color: #666666; font-style: italic;">#baseurl=http://mirror.centos.org/centos/5/contrib/i386/</span>
<span style="color: #007800;">gpgcheck</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">enabled</span>=<span style="color: #000000;">0</span>
<span style="color: #007800;">gpgkey</span>=<span style="color: #c20cb9; font-weight: bold;">file</span>:<span style="color: #000000; font-weight: bold;">///</span>etc<span style="color: #000000; font-weight: bold;">/</span>pki<span style="color: #000000; font-weight: bold;">/</span>rpm-gpg<span style="color: #000000; font-weight: bold;">/</span>RPM-GPG-KEY-CentOS-<span style="color: #000000;">5</span></pre></div></div>

<p>Perform the operating system installation via yum, installing base OS.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server opt<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2YUM
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server EC2YUM<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ yum <span style="color: #660033;">-c</span> yum-ami.conf <span style="color: #660033;">--installroot</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base <span style="color: #660033;">-y</span> groupinstall Base
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server EC2YUM<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">cp</span> yum-ami.conf <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>yum.conf</pre></div></div>

<p>Install openssh dependencies to allow you to connect via SSH</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server EC2YUM<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ yum <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2YUM<span style="color: #000000; font-weight: bold;">/</span>yum-ami.conf <span style="color: #660033;">--installroot</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #000000; font-weight: bold;">*</span>openssh<span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server EC2YUM<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">chroot</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>chkconfig sshd <span style="color: #660033;">--add</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server EC2YUM<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">chroot</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>chkconfig <span style="color: #660033;">--level</span> <span style="color: #000000;">12345</span> sshd on</pre></div></div>

<p>Install precompiled modules supplied by Amazon, since the kernel modules installed by yum are not appropriate for the EC2 environment.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.philchen.com<span style="color: #000000; font-weight: bold;">/</span>wp-content<span style="color: #000000; font-weight: bold;">/</span>uploads<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span><span style="color: #000000; font-weight: bold;">/</span>05<span style="color: #000000; font-weight: bold;">/</span>kernel-modules-<span style="color: #000000;">261633</span>-xenu.tgz
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">gunzip</span> <span style="color: #660033;">-c</span> kernel-modules261633-xenu.tgz <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xvf</span> -
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mv</span> 2.6.16.33-xenU <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">chroot</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>depmod <span style="color: #660033;">-ae</span> 2.6.16.33-xenU</pre></div></div>

<p>If you are installing 32bit use the following download instead</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.philchen.com<span style="color: #000000; font-weight: bold;">/</span>wp-content<span style="color: #000000; font-weight: bold;">/</span>uploads<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span><span style="color: #000000; font-weight: bold;">/</span>05<span style="color: #000000; font-weight: bold;">/</span>kernel-modules2616-xenu.tgz
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">gunzip</span> <span style="color: #660033;">-c</span> kernel-modules2616-xenu.tgz <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xvf</span> -
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> lib<span style="color: #000000; font-weight: bold;">/</span>modules
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mv</span> 2.6.16-xenU <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-32bit-base<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">chroot</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-32bit-base <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>depmod <span style="color: #660033;">-ae</span> 2.6.16-xenU</pre></div></div>

<p>Delete Kudzu from startup since for some reason it messes up your network settings on first startup of the image.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">chroot</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>chkconfig <span style="color: #660033;">--del</span> kudzu</pre></div></div>

<p>Configure SSH to allow Root login only via key.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssh<span style="color: #000000; font-weight: bold;">/</span>sshd_config
&nbsp;
UseDNS no
PermitRootLogin without-password</pre></div></div>

<p>Configure the images network settings</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>sysconfig<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server sysconfig<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">vi</span> network
&nbsp;
<span style="color: #007800;">NETWORKING</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span>
<span style="color: #007800;">HOSTNAME</span>=localhost.localdomain
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server sysconfig<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>sysconfig<span style="color: #000000; font-weight: bold;">/</span>network-scripts<span style="color: #000000; font-weight: bold;">/</span>ifcfg-eth0
&nbsp;
<span style="color: #007800;">ONBOOT</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span>
<span style="color: #007800;">DEVICE</span>=eth0
<span style="color: #007800;">BOOTPROTO</span>=dhcp</pre></div></div>

<p>This script grabs the public key credentials for your root login.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>getssh
&nbsp;
<span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;"># chkconfig: 2345 95 20</span>
<span style="color: #666666; font-style: italic;"># description: getssh</span>
<span style="color: #666666; font-style: italic;"># processname: getssh</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>sbin
<span style="color: #666666; font-style: italic;"># Source function library.</span>
. <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>functions
&nbsp;
<span style="color: #666666; font-style: italic;"># Source networking configuration.</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>sysconfig<span style="color: #000000; font-weight: bold;">/</span>network <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> . <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>sysconfig<span style="color: #000000; font-weight: bold;">/</span>network
&nbsp;
<span style="color: #666666; font-style: italic;"># Check that networking is up.</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${NETWORKING}</span>&quot;</span> = <span style="color: #ff0000;">&quot;no&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
&nbsp;
start<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-d</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>.ssh <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span>
          <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>.ssh
          <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">700</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>.ssh
  <span style="color: #000000; font-weight: bold;">fi</span>
  <span style="color: #666666; font-style: italic;"># Fetch public key using HTTP</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>curl <span style="color: #660033;">-f</span> http:<span style="color: #000000; font-weight: bold;">//</span>169.254.169.254<span style="color: #000000; font-weight: bold;">/</span>latest<span style="color: #000000; font-weight: bold;">/</span>meta-data<span style="color: #000000; font-weight: bold;">/</span>public-keys<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span>openssh-key <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>my-key
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$?</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span>
          <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>my-key <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>authorized_keys
          <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">600</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>authorized_keys
          <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>my-key
  <span style="color: #000000; font-weight: bold;">fi</span>
  <span style="color: #666666; font-style: italic;"># or fetch public key using the file in the ephemeral store:</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-e</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>openssh_id.pub <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span>
          <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>openssh_id.pub <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>authorized_keys
          <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">600</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>authorized_keys
  <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
stop<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Nothing to do here&quot;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
restart<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  stop
  start
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># See how we were called.</span>
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
  start<span style="color: #7a0874; font-weight: bold;">&#41;</span>
    start
    <span style="color: #000000; font-weight: bold;">;;</span>
  stop<span style="color: #7a0874; font-weight: bold;">&#41;</span>
    stop
    <span style="color: #000000; font-weight: bold;">;;</span>
  restart<span style="color: #7a0874; font-weight: bold;">&#41;</span>
    restart
    <span style="color: #000000; font-weight: bold;">;;</span>
  <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> $<span style="color: #ff0000;">&quot;Usage: $0 {start|stop}&quot;</span>
    <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">esac</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #007800;">$?</span>
<span style="color: #666666; font-style: italic;">###END OF SCRIPT</span></pre></div></div>

<p>Give the getssh proper permissions</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#Fixed typo 07/09</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">chmod</span> +x <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>getssh</pre></div></div>

<p>Configure your init script to be launched in run level 3 and 4</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">chroot</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>chkconfig <span style="color: #660033;">--level</span> <span style="color: #000000;">34</span> getssh on</pre></div></div>

<p>Yum install Ruby and CURL to the image</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server EC2YUM<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2YUM<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server EC2YUM<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ yum <span style="color: #660033;">-c</span> yum-ami.conf <span style="color: #660033;">--installroot</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base <span style="color: #c20cb9; font-weight: bold;">install</span> ruby
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server EC2YUM<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ yum <span style="color: #660033;">-c</span> yum-ami.conf <span style="color: #660033;">--installroot</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base <span style="color: #c20cb9; font-weight: bold;">install</span> curl</pre></div></div>

<p>Install Java to the image, get Java file for your distro jre-6u12-linux-x64.bin and put it in the /mnt/ami-centos5.3-64bit-base</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">chroot</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base .<span style="color: #000000; font-weight: bold;">/</span>jre-6u12-linux-x64.bin</pre></div></div>

<p>Here is the part where you can install other software you wish or remove it simply by using the chroot command</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">chroot</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base <span style="color: #7a0874; font-weight: bold;">&#40;</span>put your commands here to <span style="color: #000000; font-weight: bold;">do</span> installs <span style="color: #000000; font-weight: bold;">for</span> the image<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Clean up after yourself lowering image size</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server ami-centos5.3-64bit-base<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2YUM<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server EC2YUM<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ yum <span style="color: #660033;">-c</span> yum-ami.conf <span style="color: #660033;">--installroot</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base clean all
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server EC2YUM<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">sync</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server EC2YUM<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>proc
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server EC2YUM<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base</pre></div></div>

<p>Bundle your image</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2TOOLS<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server bin<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ .<span style="color: #000000; font-weight: bold;">/</span>ec2-bundle-image <span style="color: #660033;">--image</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2AMIIMAGE<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base.img <span style="color: #660033;">--prefix</span> ami-centos5.3-64bit-base <span style="color: #660033;">--cert</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ec2<span style="color: #000000; font-weight: bold;">/</span>cert-yourcert.pem <span style="color: #660033;">--privatekey</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ec2<span style="color: #000000; font-weight: bold;">/</span>pk-yourprivatekey.pem <span style="color: #660033;">--user</span> youramazonaccountnumber <span style="color: #660033;">--destination</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2AMIFILES <span style="color: #660033;">--arch</span> x86_64</pre></div></div>

<p>The next step is to ensure you have a target bucket for your EC2 instance with the correct ACL&#8217;s you may want to use the FireFox plugin S3 Fox to do this but their are great libraries out their for your desired language. I created a bucket called phils-amis</p>
<p>Give the ACL permission to the bucket you create for your AMI:<br />
6aa5a366c34c1cbe25dc49211496e913e0351eb0e8c37aa3477e40942ec6b97c</p>
<p>Next you will upload your files to the bucket you just designated in my case phils-amis</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2TOOLS<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server bin<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ .<span style="color: #000000; font-weight: bold;">/</span>ec2-upload-bundle <span style="color: #660033;">--manifest</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2AMIFILES<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base.manifest.xml <span style="color: #660033;">--bucket</span> phils-amis <span style="color: #660033;">--access-key</span> accesskeyhere <span style="color: #660033;">--secret-key</span> secretkeyhere <span style="color: #660033;">--location</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>US, UK, us-west-<span style="color: #000000;">1</span>, ap-southeast-<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server bin<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">history</span> <span style="color: #660033;">-c</span></pre></div></div>

<p>Now you are just about done all you need to do is register your AMI. I did this part from my Macbook Pro since I had my Amazon Web Services Tools there. You can get these from <a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351">Amazon</a> keep in mind these tools are different then the AMI tools you have been using. I put mine in /Users/phil/EC2 also I created a .ec2 directory with my cerificate and private key at /Users/phil/.ec2 Also know that you can use the AWS console from their site to register AMI&#8217;s add security groups and launch them as well.</p>
<p>My .bashrc file looks like this on my laptop</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># .bashrc</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># User specific aliases and functions</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">rm</span></span>=<span style="color: #ff0000;">'rm -i'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">cp</span></span>=<span style="color: #ff0000;">'cp -i'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">mv</span></span>=<span style="color: #ff0000;">'mv -i'</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Source global definitions</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>bashrc <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
        . <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>bashrc
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$PATH</span>:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>phil<span style="color: #000000; font-weight: bold;">/</span>EC2<span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">EC2_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>phil<span style="color: #000000; font-weight: bold;">/</span>EC2
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">EC2_PRIVATE_KEY</span>=~<span style="color: #000000; font-weight: bold;">/</span>.ec2<span style="color: #000000; font-weight: bold;">/</span>pk-yourprivatekey.pem
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">EC2_CERT</span>=~<span style="color: #000000; font-weight: bold;">/</span>.ec2<span style="color: #000000; font-weight: bold;">/</span>cert-yourcertificate.pem
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">JAVA_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>System<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Frameworks<span style="color: #000000; font-weight: bold;">/</span>JavaVM.framework<span style="color: #000000; font-weight: bold;">/</span>Home<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>You now can register our new AMI and get your AMI code</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>phil<span style="color: #000000; font-weight: bold;">@</span>desktop<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>phil<span style="color: #000000; font-weight: bold;">/</span>EC2<span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #7a0874; font-weight: bold;">&#91;</span>phil<span style="color: #000000; font-weight: bold;">@</span>desktop<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ .<span style="color: #000000; font-weight: bold;">/</span>ec2-register phils-amis<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base.manifest.xml
IMAGE	ami-youramicode</pre></div></div>

<p>You will want to create a keypair to launch your AMI</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>phil<span style="color: #000000; font-weight: bold;">@</span>desktop<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ .<span style="color: #000000; font-weight: bold;">/</span>ec2-add-keypair phils-keypair-raw
&nbsp;
KEYPAIR phil-keypair  1f:<span style="color: #000000;">51</span>:ae:<span style="color: #000000;">28</span>:bf:<span style="color: #000000;">89</span>:e9:d8:1f:<span style="color: #000000;">25</span>:5d:<span style="color: #000000;">37</span>:2d:7d:b8:ca:9f:f5:f1:6f
<span style="color: #660033;">-----BEGIN</span> RSA PRIVATE KEY-----
MIIEoQIBAAKCAQBuLFg5ujHrtm1jnutSuoO8Xe56LlT+HM8v<span style="color: #000000; font-weight: bold;">/</span>xkaa39EstM3<span style="color: #000000; font-weight: bold;">/</span>aFxTHgElQiJLChp
HungXQ29VTc8rc1bW0lkdi23OH5eqkMHGhvEwqa0HWASUMll4o3o<span style="color: #000000; font-weight: bold;">/</span>IX+0f2UcPoKCOVUR+jx71Sg
5AU52EQfanIn3ZQ8lFW7Edp5a3q4DhjGlUKToHVbicL5E+g45zfB95wIyywWZfeW<span style="color: #000000; font-weight: bold;">/</span>UUF3LpGZyq<span style="color: #000000; font-weight: bold;">/</span>
ebIUlq1qTbHkLbCC2r7RTn8vpQWp47BGVYGtGSBMpTRP5hnbzzuqj3itkiLHjU39S2sJCJ0TrJx5
i8BygR4s3mHKBj8l+ePQxG1kGbF6R4yg6sECmXn17MRQVXODNHZbAgMBAAECggEAY1tsiUsIwDl5
91CXirkYGuVfLyLflXenxfI50mDFms<span style="color: #000000; font-weight: bold;">/</span>mumTqloHO7tr0oriHDR5K7wMcY<span style="color: #000000; font-weight: bold;">/</span>YY5YkcXNo7mvUVD1pM
ZNUJs7rw9gZRTrf7LylaJ58kOcyajw8TsC4e4LPbFaHwS1d6K8rXh64o6WgW4SrsB6ICmr1kGQI7
3wcfgt5ecIu4TZf0OE9IHjn+2eRlsrjBdeORi7KiUNC<span style="color: #000000; font-weight: bold;">/</span>pAG23I6MdDOFEQRcCSigCj+<span style="color: #000000;">4</span><span style="color: #000000; font-weight: bold;">/</span>mciFUSA
SWS4dMbrpb9FNSIcf9dcLxVM7<span style="color: #000000; font-weight: bold;">/</span>6KxgJNfZc9XWzUw77Jg8x92Zd0fVhHOux5IZC+UvSKWB4dyfcI
tE8C3p9bbU9VGyY5vLCAiIb4qQKBgQDLiO24GXrIkswF32YtBBMuVgLGCwU9h9HlO9mKAc2m8Cm1
jUE5IpzRjTedc9I2qiIMUTwtgnw42auSCzbUeYMURPtDqyQ7p6AjMujp9EPemcSVOK9vXYL0Ptco
xW9MC0dtV6iPkCN7gOqiZXPRKaFbWADp16p8UAIvS<span style="color: #000000; font-weight: bold;">/</span>a5XXk5jwKBgQCKkpHi2EISh1uRkhxljyWC
iDCiK6JBRsMvpLbc0v5dKwP5alo1fmdR5PJaV2qvZSj5CYNpMAy1<span style="color: #000000; font-weight: bold;">/</span>EDNTY5OSIJU+0KFmQbyhsbm
rdLNLDL4+TcnT7c62<span style="color: #000000; font-weight: bold;">/</span>aH01ohYaf<span style="color: #000000; font-weight: bold;">/</span>VCbRhtLlBfqGoQc7+sAc8vmKkesnF7CqCEKDyF<span style="color: #000000; font-weight: bold;">/</span>dhrxYdQKB
gC0iZzzNAapayz1+JcVTwwEid6j9JqNXbBc+Z2YwMi+T0Fv<span style="color: #000000; font-weight: bold;">/</span>P<span style="color: #000000; font-weight: bold;">/</span>hwkX<span style="color: #000000; font-weight: bold;">/</span>ypeOXnIUcw0Ih<span style="color: #000000; font-weight: bold;">/</span>YtGBVAC
<span style="color: #660033;">-----END</span> RSA PRIVATE KEY-----</pre></div></div>

<p>Now create the key basically cut and paste &#8212;&#8211;BEGIN RSA PRIVATE KEY&#8212;&#8211; to &#8212;&#8211;END RSA PRIVATE KEY&#8212;&#8211; including the two lines into a your keypair file.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>phil<span style="color: #000000; font-weight: bold;">@</span>desktop<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">vi</span> phil-key-pair
&nbsp;
<span style="color: #660033;">-----BEGIN</span> RSA PRIVATE KEY-----
MIIEoQIBAAKCAQBuLFg5ujHrtm1jnutSuoO8Xe56LlT+HM8v<span style="color: #000000; font-weight: bold;">/</span>xkaa39EstM3<span style="color: #000000; font-weight: bold;">/</span>aFxTHgElQiJLChp
HungXQ29VTc8rc1bW0lkdi23OH5eqkMHGhvEwqa0HWASUMll4o3o<span style="color: #000000; font-weight: bold;">/</span>IX+0f2UcPoKCOVUR+jx71Sg
5AU52EQfanIn3ZQ8lFW7Edp5a3q4DhjGlUKToHVbicL5E+g45zfB95wIyywWZfeW<span style="color: #000000; font-weight: bold;">/</span>UUF3LpGZyq<span style="color: #000000; font-weight: bold;">/</span>
ebIUlq1qTbHkLbCC2r7RTn8vpQWp47BGVYGtGSBMpTRP5hnbzzuqj3itkiLHjU39S2sJCJ0TrJx5
i8BygR4s3mHKBj8l+ePQxG1kGbF6R4yg6sECmXn17MRQVXODNHZbAgMBAAECggEAY1tsiUsIwDl5
91CXirkYGuVfLyLflXenxfI50mDFms<span style="color: #000000; font-weight: bold;">/</span>mumTqloHO7tr0oriHDR5K7wMcY<span style="color: #000000; font-weight: bold;">/</span>YY5YkcXNo7mvUVD1pM
ZNUJs7rw9gZRTrf7LylaJ58kOcyajw8TsC4e4LPbFaHwS1d6K8rXh64o6WgW4SrsB6ICmr1kGQI7
3wcfgt5ecIu4TZf0OE9IHjn+2eRlsrjBdeORi7KiUNC<span style="color: #000000; font-weight: bold;">/</span>pAG23I6MdDOFEQRcCSigCj+<span style="color: #000000;">4</span><span style="color: #000000; font-weight: bold;">/</span>mciFUSA
SWS4dMbrpb9FNSIcf9dcLxVM7<span style="color: #000000; font-weight: bold;">/</span>6KxgJNfZc9XWzUw77Jg8x92Zd0fVhHOux5IZC+UvSKWB4dyfcI
tE8C3p9bbU9VGyY5vLCAiIb4qQKBgQDLiO24GXrIkswF32YtBBMuVgLGCwU9h9HlO9mKAc2m8Cm1
jUE5IpzRjTedc9I2qiIMUTwtgnw42auSCzbUeYMURPtDqyQ7p6AjMujp9EPemcSVOK9vXYL0Ptco
xW9MC0dtV6iPkCN7gOqiZXPRKaFbWADp16p8UAIvS<span style="color: #000000; font-weight: bold;">/</span>a5XXk5jwKBgQCKkpHi2EISh1uRkhxljyWC
iDCiK6JBRsMvpLbc0v5dKwP5alo1fmdR5PJaV2qvZSj5CYNpMAy1<span style="color: #000000; font-weight: bold;">/</span>EDNTY5OSIJU+0KFmQbyhsbm
rdLNLDL4+TcnT7c62<span style="color: #000000; font-weight: bold;">/</span>aH01ohYaf<span style="color: #000000; font-weight: bold;">/</span>VCbRhtLlBfqGoQc7+sAc8vmKkesnF7CqCEKDyF<span style="color: #000000; font-weight: bold;">/</span>dhrxYdQKB
gC0iZzzNAapayz1+JcVTwwEid6j9JqNXbBc+Z2YwMi+T0Fv<span style="color: #000000; font-weight: bold;">/</span>P<span style="color: #000000; font-weight: bold;">/</span>hwkX<span style="color: #000000; font-weight: bold;">/</span>ypeOXnIUcw0Ih<span style="color: #000000; font-weight: bold;">/</span>YtGBVAC
<span style="color: #660033;">-----END</span> RSA PRIVATE KEY-----</pre></div></div>

<p>Time to start your AMI! Note that if you have a 64bit AMI it needs to be started as a large instance.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>phil<span style="color: #000000; font-weight: bold;">@</span>desktop<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>phil<span style="color: #000000; font-weight: bold;">/</span>EC2<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ec2-run-instances ami-youramiid <span style="color: #660033;">--instance-type</span> m1.large <span style="color: #660033;">-k</span> phil-key-pair <span style="color: #660033;">--region</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>US, UK, us-west-<span style="color: #000000;">1</span>, ap-southeast-<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Time to check the status</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>phil<span style="color: #000000; font-weight: bold;">@</span>desktop<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>phil<span style="color: #000000; font-weight: bold;">/</span>EC2<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ec2-describe-instances
&nbsp;
RESERVATION	r-0dc52965	027409037432	default
INSTANCE	i-yourinstance	ami-youramiid			pending	phil-key-pair	<span style="color: #000000;">0</span>		m1.large	<span style="color: #000000;">2009</span>-02-13T23:<span style="color: #000000;">51</span>:<span style="color: #000000;">11</span>+0000	us-east-1c</pre></div></div>

<p>When it running it will look like this</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>phil<span style="color: #000000; font-weight: bold;">@</span>desktop<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>phil<span style="color: #000000; font-weight: bold;">/</span>EC2<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ec2-describe-instances
&nbsp;
RESERVATION	r-0dc57965	024439027432	default
INSTANCE	i-yourinstance	ami-youramiid	ec2-<span style="color: #000000;">176</span>-<span style="color: #000000;">122</span>-<span style="color: #000000;">149</span>-109.compute-1.amazonaws.com	domU-<span style="color: #000000;">12</span>-<span style="color: #000000;">31</span>-<span style="color: #000000;">39</span>-00-<span style="color: #000000;">12</span>-C1.compute-1.internal	running	phil-key-pair	<span style="color: #000000;">0</span>		m1.large	<span style="color: #000000;">2009</span>-02-13T23:<span style="color: #000000;">51</span>:<span style="color: #000000;">11</span>+0000	us-east-1c</pre></div></div>

<p>Open the AWS Firewall ingress port 22</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>phil<span style="color: #000000; font-weight: bold;">@</span>desktop<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>phil<span style="color: #000000; font-weight: bold;">/</span>EC2<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ec2-authorize default <span style="color: #660033;">-p</span> <span style="color: #000000;">22</span></pre></div></div>

<p>Now you can ssh using your keypair as root!</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>phil<span style="color: #000000; font-weight: bold;">@</span>desktop<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-i</span> phil-key-pair root<span style="color: #000000; font-weight: bold;">@</span>ec2-<span style="color: #000000;">176</span>-<span style="color: #000000;">122</span>-<span style="color: #000000;">149</span>-109.compute-1.amazonaws.com
&nbsp;
The authenticity of host <span style="color: #ff0000;">'ec2-176-122-149-109.compute-1.amazonaws.com (174.129.149.109)'</span> can<span style="color: #ff0000;">'t be established.
RSA key fingerprint is cb:77:33:4f:a0:62:c0:a6:c8:40:99:09:25:4f:5d:ef.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '</span>ec2-<span style="color: #000000;">174</span>-<span style="color: #000000;">129</span>-<span style="color: #000000;">149</span>-109.compute-1.amazonaws.com,174.129.149.109<span style="color: #ff0000;">' (RSA) to the list of known hosts.
&nbsp;
[root@domU-11-33-39-00-12-C1 ~]$</span></pre></div></div>

<p>To terminate the instance you can do the following use the describe instance command to find the i-id then do the below</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>phil<span style="color: #000000; font-weight: bold;">@</span>desktop<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>phil<span style="color: #000000; font-weight: bold;">/</span>EC2<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ec2-terminate-instances i-yourinstance
INSTANCE	i-yourinstance	running	shutting-down</pre></div></div>

<p>If you ever need to stop deregister and delete your AMI you can do the following</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>phil<span style="color: #000000; font-weight: bold;">@</span>desktop<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>phil<span style="color: #000000; font-weight: bold;">/</span>EC2<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ec2-deregister ami-youramiid
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server bin<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>phil<span style="color: #000000; font-weight: bold;">/</span>EC2<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ec2-delete-bundle <span style="color: #660033;">-b</span> phils-amis <span style="color: #660033;">-a</span> yourkey <span style="color: #660033;">-s</span> yoursecretkey <span style="color: #660033;">-m</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base.manifest.xml
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>phil<span style="color: #000000; font-weight: bold;">@</span>desktop<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ :<span style="color: #000000; font-weight: bold;">&gt;</span>~<span style="color: #000000; font-weight: bold;">/</span>.bash_history</pre></div></div>

<p>If you need to modify your image do the above two steps of deregistering and deleting your bundle in S3 as well as delete the files in /opt/EC2AMIFILES then you can remount the image to make your changes using the same commands you did before</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> loop <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>EC2AMIIMAGE<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base.img <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-t</span> proc none <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>ami-centos5.3-64bit-base<span style="color: #000000; font-weight: bold;">/</span>proc</pre></div></div>

<p>After you remount the image you can modify your software and then re-bundle, re-upload, re-register your ami.</p>
<p>For help setting up your environment or things I may have left out please refer to the documentation at <a href="http://www.amazonaws.com">Amazon</a> or write me a comment.</p>
<p>One last note make sure you turn your EC2 Instances off if your not using them they do cost money $ <img src='http://www.philchen.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Happy AMI building!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.philchen.com/2009/02/14/how-to-create-an-amazon-elastic-compute-cloud-ec2-machine-image-ami/feed</wfw:commentRss>
		<slash:comments>63</slash:comments>
		</item>
	</channel>
</rss>
