<?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>Sam Pierson&#039;s Blog &#187; aws</title>
	<atom:link href="http://sampierson.com/blog/tag/aws/feed/" rel="self" type="application/rss+xml" />
	<link>http://sampierson.com/blog</link>
	<description>Augmentation of an Imperfect Memory.</description>
	<lastBuildDate>Wed, 21 Jul 2010 01:41:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using EC2 &#8211; Getting Started Guide example</title>
		<link>http://sampierson.com/blog/system-administration/using-ec2-getting-started-guide-example/</link>
		<comments>http://sampierson.com/blog/system-administration/using-ec2-getting-started-guide-example/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 02:52:39 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[ec2]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=129</guid>
		<description><![CDATA[Get setup to use EC2 (detailed in a prior post).
Find the AMI you want to run: List AMIs.  Find ec2-public-images/getting-started.manifest.xml and note it&#8217;s AMI number from column 2:
ec2-describe-images -o self -o amazon
...snip...
IMAGE	ami-2bb65342	ec2-public-images/getting-started.manifest.xml	amazon	available	public		i386	machine
...snip...

Create an ssh keypair that will be used to access it:
ec2-add-keypair gsg-keypair
Save key to id_rsa-gsg-keypair
Create an instance of that type that will be accessed using that [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Get setup to use EC2</strong> (detailed in a <a href="http://sampierson.com/blog/system-administration/setting-up-to-use-ec2/">prior post</a>).</p>
<p><strong>Find the AMI you want to run:</strong> List AMIs.  Find ec2-public-images/getting-started.manifest.xml and note it&#8217;s AMI number from column 2:</p>
<blockquote><p>ec2-describe-images -o self -o amazon</p>
<pre>...snip...
IMAGE	<strong>ami-2bb65342</strong>	ec2-public-images/getting-started.manifest.xml	amazon	available	public		i386	machine
...snip...</pre>
</blockquote>
<p><strong>Create an ssh keypair</strong> that will be used to access it:</p>
<blockquote><p>ec2-add-keypair gsg-keypair</p></blockquote>
<p>Save key to id_rsa-gsg-keypair</p>
<p><strong>Create an instance of that type </strong>that will be accessed using that keypair:</p>
<blockquote><p>ec2-run-instances ami-2bb65342 -k gsg-keypair</p>
<pre>RESERVATION	r-22f4254b	337706654870	default
INSTANCE	<strong>i-6b14b302</strong>	ami-2bb65342			pending	gsg-keypair	0		m1.small	2008-09-10T01:54:13+0000</pre>
</blockquote>
<p>Keep checking it until it&#8217;s status changes from <em>pending</em> to <em>running</em>:</p>
<blockquote><p>ec2-describe-instances i-6b14b302</p>
<pre>INSTANCE	i-6b14b302	ami-2bb65342	<strong>ec2-75-101-211-91.compute-1.amazonaws.com</strong>	ip-10-250-13-176.ec2.internal	<em>running</em>	gsg-keypair	0		m1.small	2008-09-10T01:54:13+0000	us-east-1b</pre>
</blockquote>
<p><strong>Allow SSH and HTTP access to instances in your default group:</strong></p>
<blockquote><p>ec2-authorize default -p 22<br />
ec2-authorize default -p 80</p></blockquote>
<div><strong>Login to your instance:</strong></div>
<blockquote><p>ssh -i Keys/aws/ec2/id_rsa-gsg-keypair root@root@ec2-75-101-211-91.compute-1.amazonaws.com</p></blockquote>
<p><strong>To tear it down:</strong></p>
<blockquote><p>ec2-terminate-instances i-6b14b302</p></blockquote>
<p>The instances hang around in the output of ec2-describe-instances for quite some time, in state <em>terminated</em>.  After I went to the store and came back, they were gone.</p>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/system-administration/using-ec2-getting-started-guide-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up to use EC2</title>
		<link>http://sampierson.com/blog/system-administration/setting-up-to-use-ec2/</link>
		<comments>http://sampierson.com/blog/system-administration/setting-up-to-use-ec2/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 01:20:29 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[ec2]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=123</guid>
		<description><![CDATA[This is a short list of the steps I took to get access to Amazon EC2.  I basically followed the EC2 Getting Started Guide.
I already had an AWS account.
Subscribed to EC2: browsed to Amazon Web Services @ Amazon.com, clicked on &#8220;Sign Up For This Web Service&#8221;, completed forms.
Generated X.509 certificates: Your Web Services Account -&#62; View Access [...]]]></description>
			<content:encoded><![CDATA[<p>This is a short list of the steps I took to get access to Amazon EC2.  I basically followed the <a href="http://docs.amazonwebservices.com/AWSEC2/2007-08-29/GettingStartedGuide/introduction.html">EC2 Getting Started Guide</a>.</p>
<p>I already had an AWS account.</p>
<p><strong>Subscribed to EC2:</strong> browsed to <a href="http://aws.amazon.com/ec2">Amazon Web Services @ Amazon.com</a>, clicked on &#8220;Sign Up For This Web Service&#8221;, completed forms.</p>
<p><strong>Generated X.509 certificates:</strong> Your Web Services Account -&gt; View Access Key Identifiers -&gt; Your X.509 Certificate -&gt; Create New.</p>
<p><strong>Downloaded credentials:</strong> Downloaded the private key and certificate to ~/.ec2 (effectively &#8211; actually in my world this is a symlink to ~/Keys/aws/ec2/ ).</p>
<p><strong>Figured out my EC2 user ID:</strong> Your Web Services Account -&gt; Account Activity -&gt; Account Number.  Remove the hyphens to generate a 12 digit number.  This is your EC2 userid.  <em>This step appears to be redundant.  After setting up and tearing down an instance, I have yet to use this userid.</em></p>
<p><strong>Downloaded the EC2 Command Line tools:</strong> from the <a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351&amp;categoryID=88">Amazon EC2 Resource Center</a>.  Unzipped them and moved them to ~/Library/ec2-api-tools-1.3-24159 (seemed like a good place, this being Mac OS X).</p>
<p><strong>Setup environment variables:</strong> Arranged for EC2_HOME environment variable to be set, and it&#8217;s bin dir to be added to my path, my JAVA_HOME to be set, and for the tools to know who I am (EC2_PRIVATE_KEY and EC2_CERT), in .bash_profile:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><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: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">EC2_HOME</span>=~<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>ec2-api-tools-<span style="color: #000000;">1.3</span>-<span style="color: #000000;">24159</span>
<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>bin:<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span><span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$EC2_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">EC2_CERT</span>=~<span style="color: #000000; font-weight: bold;">/</span>Keys<span style="color: #000000; font-weight: bold;">/</span>aws<span style="color: #000000; font-weight: bold;">/</span>ec2<span style="color: #000000; font-weight: bold;">/</span>cert-XXXXXXXX.pem
<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>Keys<span style="color: #000000; font-weight: bold;">/</span>aws<span style="color: #000000; font-weight: bold;">/</span>ec2<span style="color: #000000; font-weight: bold;">/</span>pk-XXXXXXXX.pem</pre></div></div>

<div>
<div>Activate all those variables (start a new terminal window) and in it see if you are up and running by typing:</div>
<div>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ec2-describe-images <span style="color: #660033;">-o</span> self <span style="color: #660033;">-o</span> amazon</pre></div></div>

<div>If it produces a list of AMIs (Amazon Machine Images), you are good to go.</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/system-administration/setting-up-to-use-ec2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
