<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.alestic.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
    <title>Alestic.com</title>
    <link rel="alternate" type="text/html" href="http://alestic.com/" />
    
    <id>tag:alestic.com,2009-04-25://1</id>
    <updated>2012-04-29T02:47:38Z</updated>
    <subtitle>Ubuntu on Amazon EC2</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.25</generator>

<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.alestic.com/alestic" /><feedburner:info uri="alestic" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>alestic</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry>
    <title>Ubuntu Developer Summit, May 2012 (Oakland)</title>
    <link rel="alternate" type="text/html" href="http://feeds.alestic.com/~r/alestic/~3/lfZVg6feM9I/ubuntu-uds" />
    <id>tag:alestic.com,2012://1.139</id>

    <published>2012-04-30T13:00:00Z</published>
    <updated>2012-04-29T02:47:38Z</updated>

    <summary>I will be attending the Ubuntu Developer Summit (UDS) next week in Oakland, CA.  This event brings people from around the world together in one place every six months to discuss and plan for the next release of Ubuntu.  The...</summary>
    <author>
        <name>Eric Hammond</name>
        <uri>https://plus.google.com/111045584683584396225/about</uri>
    </author>
    
        <category term="EC2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="PlanetUbuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ubuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="UbuntuCloud" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="2012" label="2012" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="aws" label="AWS" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ec2" label="EC2" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="events" label="events" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ubuntu" label="Ubuntu" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="uds" label="UDS" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://alestic.com/">
        &lt;p&gt;I will be attending the &lt;a href="http://uds.ubuntu.com/"&gt;Ubuntu Developer Summit&lt;/a&gt; (UDS) next week in Oakland, CA.  This event brings people from around the world together in one place every six months to discuss and plan for the next release of Ubuntu.  The May 2012 UDS is for Ubuntu-Q which will eventually be named and become Ubuntu 12.10 when it is released in October (2012-10).&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve attended two UDS in person prior to this, one held at Google (Mountain View) for Ubuntu Jaunty (9.04) and one in Dallas for Ubuntu Lucid (10.04).  UDS wanders around the world to mix it up and get input from a wide variety of contributors.  I&amp;#8217;m not a fan of flying long distances, so I tend to wait until UDS comes to within a couple hours of my home in Los Angeles.&lt;/p&gt;

&lt;p&gt;My primary involvement at UDS is to contribute my perspectives to the plans for Ubuntu as it relates to running on Amazon EC2 and interacting with other features of AWS, though I also have interest in general Ubuntu server functionality.  I&amp;#8217;ve been running Ubuntu on servers since 2005, and Ubuntu servers on EC2 since 2007.&lt;/p&gt;

&lt;p&gt;I am grateful to Canonical for sponsoring my trip to and stay at UDS as they do for many community members.  I continue to be impressed by how Ubuntu is developed in such an open fashion with Canonical&amp;#8217;s support.&lt;/p&gt;

&lt;p&gt;All community members interested in learning about how Ubuntu is developed and/or interested in helping give input to the future of Ubuntu are welcome to participate in UDS. You can either attend in person as I will be, or you can participate online.  Be sure to &lt;a href="http://uds.ubuntu.com/"&gt;register (free) at the UDS site&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Taking a full week off for UDS is a little much for me, so I&amp;#8217;ll be attending three full days (Wed-Fri).  Will I see you there or online?  What feedback and suggestions would you have for running Ubuntu on EC2?&lt;/p&gt;

        

&lt;p&gt;
Original article: 
&lt;a href="http://alestic.com/2012/04/ubuntu-uds"&gt;http://alestic.com/2012/04/ubuntu-uds&lt;/a&gt;
&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/alestic/~4/lfZVg6feM9I" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://alestic.com/2012/04/ubuntu-uds</feedburner:origLink></entry>

<entry>
    <title>Uploading Known ssh Host Key in EC2 user-data Script</title>
    <link rel="alternate" type="text/html" href="http://feeds.alestic.com/~r/alestic/~3/SsDZzsdpS7M/ec2-ssh-host-key" />
    <id>tag:alestic.com,2012://1.138</id>

    <published>2012-04-09T14:00:00Z</published>
    <updated>2012-04-09T18:06:14Z</updated>

    <summary>The ssh protocol uses two different keys to keep you secure: The user ssh key is the one we normally think of. This authenticates us to the remote host, proving that we are who we say we are and allowing...</summary>
    <author>
        <name>Eric Hammond</name>
        <uri>https://plus.google.com/111045584683584396225/about</uri>
    </author>
    
        <category term="EC2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="PlanetUbuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ubuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="UbuntuCloud" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="ec2" label="EC2" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="keys" label="keys" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="privacy" label="privacy" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="security" label="security" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ssh" label="ssh" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="userdata" label="user-data" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="userdatascripts" label="user-data scripts" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://alestic.com/">
        &lt;p&gt;The ssh protocol uses two different keys to keep you secure:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;user ssh key&lt;/strong&gt; is the one we normally think of.  This
authenticates us to the remote host, proving that we are who we say we
are and allowing us to log in.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;ssh host key&lt;/strong&gt; gets less attention, but is also important.  This
authenticates the remote host to our local computer and proves that the ssh session is
encrypted so that nobody can be listening in.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every time you see a prompt like the following, ssh is checking the
host key and asking you to make sure that your session is going to
be encrypted securely.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;The authenticity of host 'ec2-...' can't be established.
ECDSA key fingerprint is ca:79:72:ea:23:94:5e:f5:f0:b8:c0:5a:17:8c:6f:a8.
Are you sure you want to continue connecting (yes/no)?
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you answer &amp;#8220;yes&amp;#8221; without verifying that the remote ssh host
key fingerprint is the same, then you are basically saying:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;em&gt;I don&amp;#8217;t need this ssh session encrypted.  It&amp;#8217;s fine for any
man-in-the-middle to intercept the communication.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ouch! (But &lt;a href="http://alestic.com/2009/08/ec2-poll-fingerprint"&gt;a lot of people do this&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;Note: If you have a line like the following in your ssh config file,
then you are automatically answering &amp;#8220;yes&amp;#8221; to this prompt for every
ssh connection.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# DON'T DO THIS!
StrictHostKeyChecking false
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Care about security&lt;/h2&gt;

&lt;p&gt;Since you &lt;em&gt;do&lt;/em&gt; care about security and privacy, you want to verify
that you are talking to the right server using encryption and that no
man-in-the-middle can intercept your session.&lt;/p&gt;

&lt;p&gt;There are a couple approaches you can take to check the fingerprint
for a new Amazon EC2 instance.  The first is to wait for the console
output to be available from the instance, retrieve it, and verify that
the ssh host key fingerprint in the console output is the same as the
one which is being presented to you in the prompt.&lt;/p&gt;

&lt;p&gt;Scott Moser has written a blog post describing how to &lt;a href="http://ubuntu-smoser.blogspot.com/2010/07/verify-ssh-keys-on-ec2-instances.html"&gt;verify ssh keys
on EC2 instances&lt;/a&gt;.  It&amp;#8217;s worth reading so that you understand
the principles and the official way to do this.&lt;/p&gt;

&lt;p&gt;The rest of this article is going to present a different approach that
lets you in to your new instance quickly and securely.&lt;/p&gt;

&lt;h2&gt;Passing ssh host key to new EC2 instance&lt;/h2&gt;

&lt;p&gt;Instead of letting the new EC2 instance generate its own ssh host key
and waiting for it to communicate the fingerprint through the EC2
console output, we can generate the new ssh host key on our local
system and pass it to the new instance.&lt;/p&gt;

&lt;p&gt;Using this approach, we already know the public side of the ssh key so
we don&amp;#8217;t have to wait for it to become available through the console
(which can take minutes).&lt;/p&gt;

&lt;p&gt;Generate a new ssh host key for the new EC2 instance.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;tmpdir=$(mktemp -d /tmp/ssh-host-key.XXXXXX)
keyfile=$tmpdir/ssh_host_ecdsa_key
ssh-keygen -q -t ecdsa -N "" -C "" -f $keyfile
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Create the user-data script that will set the ssh host key.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;userdatafile=$tmpdir/set-ssh-host-key.user-data
cat &amp;lt;&amp;lt;EOF &amp;gt;$userdatafile
#!/bin/bash -xeu
cat &amp;lt;&amp;lt;EOKEY &amp;gt;/etc/ssh/ssh_host_ecdsa_key
$(cat $keyfile)
EOKEY
cat &amp;lt;&amp;lt;EOKEY &amp;gt;/etc/ssh/ssh_host_ecdsa_key.pub
$(cat $keyfile.pub)
EOKEY
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Run an EC2 instance, say Ubuntu 11.10 Oneiric, passing in the
user-data script.  Make a note of the new instance id.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ec2-run-instances --key $USER --user-data-file $userdatafile ami-4dad7424
instanceid=i-...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Wait for the instance to get a public DNS name and make a note of it.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ec2-describe-instances $instanceid
host=ec2-...compute-1.amazonaws.com
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Add new public ssh host key to our local ssh known_hosts after
removing any leftover key (e.g., from previous EC2 instance at same IP
address).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;knownhosts=$HOME/.ssh/known_hosts
ssh-keygen -R $host -f $knownhosts
ssh-keygen -R $(dig +short $host) -f $knownhosts
(
  echo -n "$host "; cat $keyfile.pub
  echo -n "$(dig +short $host) "; cat $keyfile.pub
) &amp;gt;&amp;gt; $knownhosts
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When the instance starts running and the user-data script has
executed, you can ssh in to the server without being prompted to
verify the fingerprint&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ssh ubuntu@$host
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Don&amp;#8217;t forget to clean up and to terminate your test instance.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rm -rf $tmpdir
ec2-terminate-instances $instanceid
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Caveat&lt;/h2&gt;

&lt;p&gt;There is one big drawback in the above sample implementation of this
approach.  We have placed secret information (the private ssh host
key) into the EC2 user-data, which I generally recommend against.&lt;/p&gt;

&lt;p&gt;Any user who can log in to the instance or who can cause the instance
to request a URL and get the output, can retrieve the user-data.  You
might think this is unlikely to happen, but I&amp;#8217;d rather avoid or
minimize unnecessary risk.&lt;/p&gt;

&lt;p&gt;In a production implementation of this approach, I would take steps
like the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Upload the new ssh host key to S3 in a private object.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Generate an authenticated URL to the S3 object and have that URL
expire in, say, 10 minutes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the user-data script, download the ssh host key with the
authenticated, expiring S3 URL.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, there is a short window of exposure and you don&amp;#8217;t have to worry
about protecting the user-data after the URL has expired.&lt;/p&gt;

        

&lt;p&gt;
Original article: 
&lt;a href="http://alestic.com/2012/04/ec2-ssh-host-key"&gt;http://alestic.com/2012/04/ec2-ssh-host-key&lt;/a&gt;
&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/alestic/~4/SsDZzsdpS7M" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://alestic.com/2012/04/ec2-ssh-host-key</feedburner:origLink></entry>

<entry>
    <title>Seeding Torrents with Amazon S3 and s3cmd on Ubuntu</title>
    <link rel="alternate" type="text/html" href="http://feeds.alestic.com/~r/alestic/~3/-X3DBzGr_4k/aws-s3-torrent" />
    <id>tag:alestic.com,2012://1.76</id>

    <published>2012-04-04T14:00:00Z</published>
    <updated>2012-04-04T08:10:40Z</updated>

    <summary>Amazon Web Services is such a huge, complex service with so many products and features that sometimes very simple but powerful features fall through the cracks when you’re reading the extensive documentation. One of these features, which has been around...</summary>
    <author>
        <name>Eric Hammond</name>
        <uri>https://plus.google.com/111045584683584396225/about</uri>
    </author>
    
        <category term="PlanetUbuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ubuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="UbuntuCloud" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="aws" label="AWS" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="bittorrent" label="bittorrent" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="s3" label="S3" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="s3cmd" label="s3cmd" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="seeding" label="seeding" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="torrent" label="torrent" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ubuntu" label="ubuntu" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://alestic.com/">
        &lt;p&gt;Amazon Web Services is such a huge, complex service with so many products and features that sometimes very simple but powerful features fall through the cracks when you&amp;#8217;re reading the extensive documentation.&lt;/p&gt;

&lt;p&gt;One of these features, which has been around for a very long time, is the ability to use AWS to seed (serve) downloadable files using the BitTorrent&amp;#8482; protocol.  You don&amp;#8217;t need to run EC2 instances and set up software.  In fact, you don&amp;#8217;t need to do anything except upload your files to S3 and make them publicly available.&lt;/p&gt;

&lt;p&gt;Any file available for normal HTTP download in S3 is also available for download through a torrent.  All you need to do is append the string &lt;code&gt;?torrent&lt;/code&gt; to the end of the URL and Amazon S3 takes care of the rest.&lt;/p&gt;

&lt;h2&gt;Steps&lt;/h2&gt;

&lt;p&gt;Let&amp;#8217;s walk through uploading a file to S3 and accessing it with a torrent client using Ubuntu as our local system.  This approach uses &lt;code&gt;s3cmd&lt;/code&gt; to upload the file to S3, but any other S3 software can get the job done, too.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install the useful &lt;code&gt;s3cmd&lt;/code&gt; tool and set up a configuration file for it.  This is a one time step:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo apt-get install s3cmd
s3cmd --configure
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The configure phase will prompt for your AWS access key id and AWS secret access key.  These are stored in &lt;code&gt;$HOME/.s3cmd&lt;/code&gt; which you should protect.  You can press [Enter] for the encryption password and GPG program.  I prefer &amp;#8220;Yes&amp;#8221; for using the HTTPS protocol, especially if I am using s3cmd from outside of EC2.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create an S3 bucket and upload the file with public access:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bucket=YOURBUCKETNAME
filename=FILETOUPLOAD
basename=$(basename $filename)
s3cmd mb s3://$bucket
s3cmd put --acl-public $filename s3://$bucket/$basename
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Display the URLs which can be used to access the file through normal web download and through a torrent:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cat &amp;lt;&amp;lt;EOM
web:     http://$bucket.s3.amazonaws.com/$basename
torrent: http://$bucket.s3.amazonaws.com/$basename?torrent
EOM
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;Notes&lt;/h2&gt;

&lt;ol type="a"&gt;
  &lt;li  type="a"&gt;&lt;p&gt;The above process makes your file publicly available to anybody in the world.  Don&amp;#8217;t use this for anything you wish to keep private.&lt;/p&gt;&lt;/li&gt;

  &lt;li type="a"&gt;&lt;p&gt;You will pay standard S3 network charges for all downloads from S3 including the initial torrent seeding.  You do not pay for network transfers between torrent peers once folks are serving the file chunks to each other.&lt;/p&gt;&lt;/li&gt;

  &lt;li type="a"&gt;&lt;p&gt;You cannot throttle the rate or frequency of downloads from S3.  You can turn off access to prevent further downloads, but monitoring accesses and usage is not entirely real time.&lt;/p&gt;&lt;/li&gt;

  &lt;li type="a"&gt;&lt;p&gt;If your file is not popular enough for other torrent peers to be actively serving it, then every person who downloads it will transfer the entire content from S3&amp;#8217;s torrent servers.&lt;/p&gt;&lt;/li&gt;

  &lt;li type="a"&gt;&lt;p&gt;There is no way to force people to use the Torrent URL.  If they know what they are doing, they can easily remove &amp;#8220;?torrent&amp;#8221; and download the entire file direct from S3, perhaps resulting in a higher cost to you.&lt;/p&gt;&lt;/li&gt;

&lt;/ol&gt;

        

&lt;p&gt;
Original article: 
&lt;a href="http://alestic.com/2012/04/aws-s3-torrent"&gt;http://alestic.com/2012/04/aws-s3-torrent&lt;/a&gt;
&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/alestic/~4/-X3DBzGr_4k" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://alestic.com/2012/04/aws-s3-torrent</feedburner:origLink></entry>

<entry>
    <title>CloudCamp</title>
    <link rel="alternate" type="text/html" href="http://feeds.alestic.com/~r/alestic/~3/OCYCW75aeH4/cloudcamp" />
    <id>tag:alestic.com,2012://1.137</id>

    <published>2012-03-10T03:50:09Z</published>
    <updated>2012-04-04T21:16:28Z</updated>

    <summary>There are a number of CloudCamp events coming up in cities around the world. These are free events, organized around the various concepts, technologies, and services that fall under the “cloud” term. There’s always some discussion about my favorite topic,...</summary>
    <author>
        <name>Eric Hammond</name>
        <uri>https://plus.google.com/111045584683584396225/about</uri>
    </author>
    
        <category term="EC2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="PlanetUbuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ubuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="aws" label="AWS" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="cloudcamp" label="CloudCamp" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ec2" label="EC2" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="events" label="events" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="losangeles" label="LosAngeles" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="rochester" label="Rochester" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://alestic.com/">
        &lt;p&gt;There are a number of &lt;a href="http://cloudcamp.org/"&gt;CloudCamp events&lt;/a&gt; coming up in cities around the world.  These are free events, organized around the various concepts, technologies, and services that fall under the &amp;#8220;cloud&amp;#8221; term.&lt;/p&gt;

&lt;p&gt;There&amp;#8217;s always some discussion about my favorite topic, Amazon AWS and EC2, but there are sure to be experts and beginners for every other cloud-related flavor as well.  You can attend presentations, join in discussions, or hang out in the hallway and make connections with local folks who are interested in the same things you are.&lt;/p&gt;

&lt;p&gt;CloudCamp follows somewhat of an unconference format, though the couple I&amp;#8217;ve been to in LA tended to have more pre-planned elements than, say, a BarCamp.  Glancing through the schedules, it looks like each city also has their own twist and personality for CloudCamp.&lt;/p&gt;

&lt;p&gt;Here are two upcoming CloudCamps that are of particular interest to me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="http://cloudcamp.org/la/11"&gt;CloudCamp Los Angeles&lt;/a&gt;&lt;/strong&gt; - I plan to attend this short event to hang out with old friends and make some new acquaintances. (Do we really need 12 organizers for 3 hours?)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="http://cloudcamproc.org/"&gt;CloudCamp Rochester&lt;/a&gt;&lt;/strong&gt; - A full day event with some big clouderati names in attendance including Jeff Barr, Mitch Garnaat, David Kavanagh, Chris Moyer.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have a business related to &amp;#8220;cloud&amp;#8221; (and who doesn&amp;#8217;t these days) why not pitch in with a little support as a sponsor?  These are small events, so it doesn&amp;#8217;t take much to help out. Plus you get your brand in front of your target market.  &lt;/p&gt;

&lt;p&gt;I went ahead and tossed in a bit personally to &lt;a href="http://cloudcamproc.org/alestic-com/"&gt;sponsor CloudCamp Rochester&lt;/a&gt; as they make it easy to &lt;a href="http://cloudcamproc.org/become-a-sponsor/"&gt;contribute and know what you&amp;#8217;re getting in return&lt;/a&gt;.  I couldn&amp;#8217;t find any sponsorship information for CloudCamp LA, but am still looking if anybody knows how that works.&lt;/p&gt;

        

&lt;p&gt;
Original article: 
&lt;a href="http://alestic.com/2012/03/cloudcamp"&gt;http://alestic.com/2012/03/cloudcamp&lt;/a&gt;
&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/alestic/~4/OCYCW75aeH4" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://alestic.com/2012/03/cloudcamp</feedburner:origLink></entry>

<entry>
    <title>Use the Same Architecture (64-bit) on All EC2 Instance Types</title>
    <link rel="alternate" type="text/html" href="http://feeds.alestic.com/~r/alestic/~3/xtltIZ7_TwA/ec2-64-bit" />
    <id>tag:alestic.com,2012://1.136</id>

    <published>2012-03-08T12:05:06Z</published>
    <updated>2012-03-08T12:34:43Z</updated>

    <summary>A few hours ago, Amazon AWS announced that all EC2 instance types can now run 64-bit AMIs. Though t1.micro, m1.small, and c1.medium will continue to also support 32-bit AMIs, it is my opinion that there is virtually no reason to...</summary>
    <author>
        <name>Eric Hammond</name>
        <uri>https://plus.google.com/111045584683584396225/about</uri>
    </author>
    
        <category term="EC2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="PlanetUbuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ubuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="UbuntuCloud" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="amis" label="AMIs" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="architecture" label="architecture" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ec2" label="EC2" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="instancetypes" label="instance types" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://alestic.com/">
        &lt;p&gt;A few hours ago, Amazon AWS announced that &lt;a href="http://aws.typepad.com/aws/2012/03/ec2-updates-new-instance-64-bit-bit-ubiquity-ssh-client.html"&gt;all EC2 instance types can now run 64-bit AMIs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Though t1.micro, m1.small, and c1.medium will continue to also support 32-bit AMIs, it is my opinion that there is virtually no reason to use 32-bit instances on EC2 any more.&lt;/p&gt;

&lt;p&gt;This is fantastic news!&lt;/p&gt;

&lt;p&gt;Sticking with 64-bit instances everywhere all the time gives you the most flexibility to &lt;a href="http://alestic.com/2011/02/ec2-change-type"&gt;switch the instance type of your running instances&lt;/a&gt;, reduces the choices and work necessary when building your own AMIs, and just makes life simpler.&lt;/p&gt;

&lt;p&gt;In fact, to celebrate this occasion, I have dropped my listing of 32-bit Ubuntu AMI ids at the top of &lt;a href="http://alestic.com/"&gt;Alestic.com&lt;/a&gt;.  The new simplified AMI id table listing only 64-bit Ubuntu AMIs now fits into the right sidebar.&lt;/p&gt;

&lt;p&gt;Simply pick an EC2 region in the pulldown in the right sidebar, and you&amp;#8217;ll get a clean listing of current available Ubuntu AMIs.  Click on the orange arrow to the right of the AMI id to launch an instance of Ubuntu in your AWS console.&lt;/p&gt;

&lt;p&gt;Note that reserved instances only specify an instance type not an architecture, so if you have already purchased reserved instances for m1.small or c1.medium, you can switch from 32-bit to 64-bit and still have your new instance be covered by the reserved instance pricing.&lt;/p&gt;

&lt;p&gt;Do you have reasons why you might still need to run 32-bit instances on EC2?  How much work is it going to take you to convert your existing instances and AMIs from 32-bit to 64-bit?&lt;/p&gt;

        

&lt;p&gt;
Original article: 
&lt;a href="http://alestic.com/2012/03/ec2-64-bit"&gt;http://alestic.com/2012/03/ec2-64-bit&lt;/a&gt;
&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/alestic/~4/xtltIZ7_TwA" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://alestic.com/2012/03/ec2-64-bit</feedburner:origLink></entry>

<entry>
    <title>ec2-consistent-snapshot on GitHub and v0.43 Released</title>
    <link rel="alternate" type="text/html" href="http://feeds.alestic.com/~r/alestic/~3/_5N_YOEMmSw/ec2-consistent-snapshot-on-github" />
    <id>tag:alestic.com,2012://1.135</id>

    <published>2012-02-08T14:00:00Z</published>
    <updated>2012-02-08T23:46:37Z</updated>

    <summary>The source for ec2-conssitent-snapshot has historically been available here: ec2-consistent-snapshot on Launchpad.net using Bazaar For your convenience, it is now also available here: ec2-consistent-snapshot on GitHub using Git You are welcome to fork ec2-consistent snapshot under the liberal terms of...</summary>
    <author>
        <name>Eric Hammond</name>
        <uri>https://plus.google.com/111045584683584396225/about</uri>
    </author>
    
        <category term="EC2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="PlanetUbuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ubuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="UbuntuCloud" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="aws" label="aws" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ebs" label="ebs" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ebssnapshots" label="ebs snapshots" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ebsvolumes" label="ebs volumes" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ec2" label="ec2" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ec2consistentsnapshot" label="ec2-consistent-snapshot" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://alestic.com/">
        &lt;p&gt;The source for &lt;a href="http://alestic.com/2009/09/ec2-consistent-snapshot"&gt;ec2-conssitent-snapshot&lt;/a&gt; has historically been available here:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;a href="https://code.launchpad.net/~alestic/ec2-consistent-snapshot/trunk"&gt;ec2-consistent-snapshot on Launchpad.net using Bazaar&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For your convenience, it is now also available here:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;a href="https://github.com/alestic/ec2-consistent-snapshot"&gt;ec2-consistent-snapshot on GitHub using Git&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You are welcome to fork ec2-consistent snapshot under the liberal terms of the &lt;a href="http://www.apache.org/licenses/LICENSE-2.0"&gt;Apache License, Version 2.0&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I welcome patch submissions, especially if:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The patch accomplishes a single enhancement or bug fix, changing as little as possible to accomplish the goals, while still performing appropriate error checks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The patch includes relevant updates to the documentation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The patch does not add functionality outside of the narrow goal of ec2-consistent-snapshot (initiate EBS snapshots with consistent filesystems and application data).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The patch is created against the latest version of the source.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I also recommend submitting a bug/feature in Launchpad.net to track adding the patch to ec2-consistent-snapshot:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;https://bugs.launchpad.net/ec2-consistent-snapshot/+filebug&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not all patches will be accepted, but you are encouraged to maintain forks on GitHub so that others can include your patches if they find them useful.&lt;/p&gt;

&lt;h2&gt;New Release&lt;/h2&gt;

&lt;p&gt;Two user-contributed patches have been incorporated (with minor adjustments) into ec2-consistent-snapshot with the latest release of version 0.43:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Ability to freeze multiple file systems by specifying &amp;#8212;freeze-filesystem multiple times (thanks to &lt;a href="https://bugs.launchpad.net/ec2-consistent-snapshot/+bug/922068"&gt;Bobb Crosbie&lt;/a&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ability to specify commands to run just before freezing the file system(s) and just after thawing the file systems (thanks to &lt;a href="https://bugs.launchpad.net/ec2-consistent-snapshot/+bug/925725"&gt;Craig Tracey&lt;/a&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The new release of ec2-consistent-snapshot is available in the &lt;a href="https://launchpad.net/~alestic/+archive/ppa"&gt;Alestic PPA&lt;/a&gt; for easy installation and upgrading in Ubuntu.  You can install it on Ubuntu using:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo add-apt-repository ppa:alestic &amp;amp;&amp;amp;
sudo apt-get update &amp;amp;&amp;amp;
sudo apt-get install -y ec2-consistent-snapshot
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;ec2-consistent-snapshot is usable on other Linux distros as long as you install dependencies like xfsprogs, perl, libnet-amazon-ec2-perl, libfile-slurp-perl, libwww-perl, libdigest-hmac-perl, libparams-validate-perl, libxml-simple-perl, libmoose-perl, libcrypt-ssleay-perl.&lt;/p&gt;

        

&lt;p&gt;
Original article: 
&lt;a href="http://alestic.com/2012/02/ec2-consistent-snapshot-on-github"&gt;http://alestic.com/2012/02/ec2-consistent-snapshot-on-github&lt;/a&gt;
&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/alestic/~4/_5N_YOEMmSw" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://alestic.com/2012/02/ec2-consistent-snapshot-on-github</feedburner:origLink></entry>

<entry>
    <title>You Should Use EBS Boot Instances on Amazon EC2</title>
    <link rel="alternate" type="text/html" href="http://feeds.alestic.com/~r/alestic/~3/N5NZdFpXkUE/ec2-ebs-boot-recommended" />
    <id>tag:alestic.com,2012://1.134</id>

    <published>2012-01-03T19:00:00Z</published>
    <updated>2012-01-05T01:38:33Z</updated>

    <summary>EBS boot vs. instance-store If you are just getting started with Amazon EC2, then use EBS boot instances and stop reading this article. Forget that you ever heard about instance-store and accept my apology that I just mentioned it. Once...</summary>
    <author>
        <name>Eric Hammond</name>
        <uri>https://plus.google.com/111045584683584396225/about</uri>
    </author>
    
        <category term="EC2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="PlanetUbuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ubuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="UbuntuCloud" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="advice" label="advice" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="amis" label="AMIs" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ebs" label="EBS" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ebsboot" label="EBS boot" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ec2" label="EC2" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="instancestore" label="instance-store" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="instances" label="instances" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://alestic.com/">
        &lt;p&gt;&lt;em&gt;EBS boot vs. instance-store&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you are just getting started with Amazon EC2, then use EBS boot
instances and stop reading this article.  Forget that you ever heard
about instance-store and accept my apology that I just mentioned
it.  Once you are completely comfortable with using EBS boot instances on
EC2, you may (or may not) want to come back here and read why you made
a good decision.&lt;/p&gt;

&lt;p&gt;EC2 experts may find that there are specific cases, few and far
between, where instance-store might make sense, but they don&amp;#8217;t attempt
to use instance-store without understanding and accounting for all the
serious drawbacks and dangers that go with making this choice.  For
example, experts using instance-store don&amp;#8217;t mind losing all of the
data on the instance as they have designed the system so that the data
is stored elsewhere and so that a new instance can easily and
automatically be rebuilt from scratch.&lt;/p&gt;

&lt;p&gt;One of the challenges for beginners is that many of the benefits of
EBS boot don&amp;#8217;t necessarily seem like something you&amp;#8217;ll need to use
right away.  Then they get down the road and into situations where
they realize that they would have been much better off if they had
gone with EBS boot in the first place and may find it takes some work
to make the transition.&lt;/p&gt;

&lt;h2&gt;Big benefits of EBS boot instances&lt;/h2&gt;

&lt;p&gt;Here are some of the reasons I use and recommend EBS boot instances.
None of these benefits are available with instance-store, so even a
single one of these can be an overriding factor for choosing EBS boot.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;EBS boot instances store the root file system on an EBS volume
which is persistent storage.  If the instance hardware fails, the
EBS volume remains accessible.  It is also possible to request the
EBS volume to persist beyond the termination of an EC2 instance.
&lt;em&gt;When an instance-store instance fails or is shut down, all of the
data on the root disk is lost forever and can never be retrieved.&lt;/em&gt;
Read more about &lt;a href="http://alestic.com/2010/01/ec2-instance-locking"&gt;protecting EC2 instances from accidental
termination and loss of data&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;EBS boot instances can be stopped and restarted at will.  The
&amp;#8220;stopped&amp;#8221; state suspends the hourly instance billing charges,
preserving the information on the EBS volumes.  The stopped
instance can be started again a few minutes later or months later,
restoring state just as if the instance was rebooted.  &lt;em&gt;An
instance-store instance can only be left running with full charges
or terminated, which causes you to lose all data on the disk.&lt;/em&gt; Read
more about &lt;a href="http://alestic.com/2011/09/ec2-reboot-stop-start"&gt;how stop/start of an EBS boot instance is similar to
and different from a simple reboot&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When something goes wrong with an EBS boot instance so that it
can&amp;#8217;t be booted, or you lose access through ssh (e.g., lost keys,
bad ssh config change), you can still view and modify or fix the
EBS root volume by attaching it to another running instance.  &lt;em&gt;With
an instance-store instance, everything on the root disk is lost and
cannot be recovered.&lt;/em&gt; Read more about &lt;a href="http://alestic.com/2011/02/ec2-fix-ebs-root"&gt;fixing files on the root EBS
volume of an EC2 instance&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;EBS boot instances can be run with a root EBS volume size from the
default specified by the AMI (often 8GB) up to 1,000GB (1TB).  &lt;em&gt;The
instance-store AMIs have a max root disk size of 10GB with no way
to increase it.&lt;/em&gt; Read more about &lt;a href="http://alestic.com/2009/12/ec2-ebs-boot-resize"&gt;increasing the root disk size of
an EBS boot AMI&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It is possible to grow the size of the root disk after an EBS boot
instance has been started. &lt;em&gt;An instance-store instance has no way
to grow the root disk size.&lt;/em&gt; Read more about &lt;a href="http://alestic.com/2010/02/ec2-resize-running-ebs-root"&gt;resizing the root
disk on a running EBS boot EC2 instance&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It is possible to change the instance type for a running EBS boot
instance without needing to start a new instance.  For example, you
can scale up from an m1.large to an m1.xlarge and then a few hours
or days later, scale back down.  &lt;em&gt;An instance-store instance is
stuck with the type on which it was originally run.&lt;/em&gt; Read more
about &lt;a href="http://alestic.com/2011/02/ec2-change-type"&gt;changing the instance type of a running EBS boot
instance&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can easily replace the hardware for your instance if you are
running an EBS boot instance.  This is extremely valuable if your
instance is having problems that you suspect may be related to the
underlying hardware.  &lt;em&gt;An instance-store instance is bound to the
hardware it started on and cannot be moved.&lt;/em&gt; Read more about &lt;a href="http://alestic.com/2011/02/ec2-move-hardware"&gt;using
stop/start to replace EC2 hardware&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;EBS boot AMIs are simpler and faster to create than instance-store
AMIs.  In fact, you can trigger the creation of an EBS boot AMI
from a running instance in one command, API call, or console click.
&lt;em&gt;You need to copy sensitive AWS credentials to the instance when
creating an instance-store AMI.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Amazon has stated that EBS boot AMIs boot up faster than S3 based
AMIs (instance-store).  In my recent experience, the difference is
negligible, especially when testing popular AMIs that are likely to
be cached, but we might as well chalk this up as another benefit.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The t1.micro instance type released recently by Amazon only
supports EBS boot instances.  This move is like a sign from Amazon
that you really don&amp;#8217;t want to run the legacy instance-store
instances.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Some versions of Windows (Server 2008) only run on EBS boot instances.  I believe this may be related to the disk size limitations of instance-store, but I don&amp;#8217;t use Windows, so am not an expert in that area.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;Possible benefits of instance-store instances&lt;/h2&gt;

&lt;p&gt;EBS volumes and EBS boot instances aren&amp;#8217;t perfect.  Running an
instance-store instance might be preferable in some very specific
cases where you don&amp;#8217;t care so much about losing the data you are
storing on the root disk.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m going to list some of the possible benefits of instance-store, but
each of these may not be as beneficial as they appear at first glance
and you must remember that running instance-store loses all of the
above benefits.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;There is a negigible cost savings with instance-store, as there is
 no charge for an EBS volume nor the I/O transactions.  &lt;em&gt;Note
 however, that the cost for an 8GB root EBS volume is only around 80
 cents per month (depending on the region) and you get about a
 billion I/O requests for a dollar, billed by the penny increment.
 The cost savings to run instance-store is generally not worth the
 increased risk of losing your valuable data, especially when you
 compare it as a percentage of the cost of running the instance
 hours in the first place (tens or hundreds of dollars per month).&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There may be some applications that perform somewhat better when
 running against ephemeral or instance-store disks than against EBS
 volumes.  Some high end users have also reported inconsistency
 in the performance they see from EBS volumes at high I/O transaction
 rates for long periods of time.
 &lt;em&gt;EBS volumes perform better for some applications and are
 generally good enough for most applications.  If you don&amp;#8217;t care
 about losing your application data, and you have tested to see that
 instance-store performs better than EBS volumes, then you could
 either run instance-store instances, or you could run EBS boot
 instances and drop your data on the ephemeral disks available to
 all instances above t1.micro.  It is also becoming increasingly popular
 to run multiple EBS volumes in a mdadm RAID-0 or LVM striping
 configuration to improve performance and smooth out some
 experiences of performance volatility.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There are a couple historical failure modes that have happened with
 EBS volumes that could not happen for instance-store disks.  &lt;em&gt;You
 may hear people say this is a reason not to use EBS volumes, but
 EBS volumes are still far more reliable, persistent, and protected
 against failure than instance-store.  The fact that it is possible
 for EBS to fail is not a reason to use the less persistent
 instance-store.  It is a reason to create regular snapshots of your
 EBS volumes to improve reliability and act as backups.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you are creating a &amp;#8220;paid AMI&amp;#8221; you can only do it as an
 instance-store AMI, not EBS boot.  &lt;em&gt;Only two of the thousands of
 people reading this article are creating paid AMIs and they already
 know this fact.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Why did I write this article?&lt;/h2&gt;

&lt;p&gt;I regularly provide consulting services in public communities like
&lt;a href="http://alestic.com/2011/09/ec2-serverfault"&gt;serverfault&lt;/a&gt;, the ##aws IRC channel on Freenode, the
&lt;a href="http://groups.google.com/group/ec2ubuntu"&gt;ec2ubuntu Google group&lt;/a&gt;, and Amazon&amp;#8217;s &lt;a href="https://forums.aws.amazon.com/forum.jspa?forumID=30"&gt;EC2 forum&lt;/a&gt;.
It&amp;#8217;s a rare week that passes where I am not telling somebody that they
would not have the problem they&amp;#8217;re having if they had been using EBS
boot instances.&lt;/p&gt;

&lt;p&gt;The saddest response I can give to a plea for help is that the
customer&amp;#8217;s valuable data has been lost because they were running
instance-store instead of EBS boot and they did not have real-time
streaming backups.&lt;/p&gt;

&lt;h2&gt;Historical background&lt;/h2&gt;

&lt;p&gt;When Amazon launched EC2 in 2006, only instance-store AMIs were
available (though they weren&amp;#8217;t called instance-store at the time as
they were the only kind).  For years, Amazon customers learned to work
with the server limitations of risking the loss of all data at any
point in time.&lt;/p&gt;

&lt;p&gt;In August of 2008, Amazon introduced the concept of EBS volumes, and
there was much rejoicing.  Data could finally be stored on persistent
disks even though the root disk remained on ephemeral storage
(another name for instance-store).&lt;/p&gt;

&lt;p&gt;In December of 2009, Amazon released the ability to launch instances
with EBS volumes as the root disk, or EBS boot instances.  Now, the
entire server could be persistent and all of the above benefits were
realized.&lt;/p&gt;

&lt;h2&gt;Notes&lt;/h2&gt;

&lt;p&gt;Just because EBS boot volumes are &amp;#8220;persistent&amp;#8221; does not mean that they
do not ever fail.  Amazon has released figures about their failure
rates, which are proportional to the number of blocks modified since
the last EBS snapshot was created.  Regular snapshots improve the
intrinsic reliability of your EBS volumes in addition to acting as
backups.  I also recommend creating regular off-site backups (outside
of Amazon) to eliminate your AWS account as a single point of
failuire.&lt;/p&gt;

&lt;p&gt;Even if you use an EBS boot instance, I still recommend keeping your
data on a separate EBS volume.  This has a number of benefits that
could perhaps form the core of a followup article.  Read &lt;a href="http://aws.amazon.com/articles/1663"&gt;an example
of how to set up a MySQL database on a separate EBS boot volume&lt;/a&gt;.
I still follow this approach with EBS boot instances, storing data on a second volume.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;[Update 2011-01-04: Added benefit #11 (Windows Server 2008).  Added note about potential (in)consistency of EBS IO at sustained, high rates.]&lt;/em&gt;&lt;/p&gt;

        

&lt;p&gt;
Original article: 
&lt;a href="http://alestic.com/2012/01/ec2-ebs-boot-recommended"&gt;http://alestic.com/2012/01/ec2-ebs-boot-recommended&lt;/a&gt;
&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/alestic/~4/N5NZdFpXkUE" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://alestic.com/2012/01/ec2-ebs-boot-recommended</feedburner:origLink></entry>

<entry>
    <title>Retrieve Public ssh Key From EC2</title>
    <link rel="alternate" type="text/html" href="http://feeds.alestic.com/~r/alestic/~3/S2phPfJZNKg/ec2-public-ssh-key" />
    <id>tag:alestic.com,2011://1.133</id>

    <published>2011-12-20T14:00:00Z</published>
    <updated>2011-12-20T05:54:40Z</updated>

    <summary>A serverfault poster had a problem that I thought was a cool challenge. I had so much fun coming up with this answer, I figured I’d share it here as it demonstrates a few handy features of EC2. Challenge The...</summary>
    <author>
        <name>Eric Hammond</name>
        <uri>https://plus.google.com/111045584683584396225/about</uri>
    </author>
    
        <category term="EC2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="PlanetUbuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ubuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="UbuntuCloud" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="challenges" label="challenges" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ec2" label="EC2" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ssh" label="ssh" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ubuntu" label="Ubuntu" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="userdata" label="user-data" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="userdatascript" label="user-data script" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://alestic.com/">
        &lt;p&gt;A serverfault poster had &lt;a href="http://serverfault.com/questions/342530/how-to-download-public-key-from-amazon-aws/342615#342615"&gt;a problem&lt;/a&gt; that I thought was a cool challenge.  I had so much fun coming up with this answer, I figured I&amp;#8217;d share it here as it demonstrates a few handy features of EC2.&lt;/p&gt;

&lt;h2&gt;Challenge&lt;/h2&gt;

&lt;p&gt;The basic need is to get the public ssh key from a keypair that exists inside of EC2.  You don&amp;#8217;t have access to the private key at the moment (but somebody else does or you will at a different location).&lt;/p&gt;

&lt;p&gt;The AWS console and EC2 API do not let you ask for the public ssh key associated with a keypair.  However, EC2 does pass the public ssh key to a new EC2 instance when you run it with a specific keypair.&lt;/p&gt;

&lt;p&gt;The problem is that we don&amp;#8217;t currently have the private key, so we can&amp;#8217;t log in to the EC2 instance to get the public key.  (Besides, if we did have the private key, we could extract the public key from it directly.)&lt;/p&gt;

&lt;h2&gt;Solution&lt;/h2&gt;

&lt;p&gt;I proposed creating a user-data script that sends the public ssh key to the EC2 instance console output.  You can retrieve the console output without logging in to the EC2 instance.&lt;/p&gt;

&lt;p&gt;Save the following code to a file named &lt;code&gt;output-ssh-key.userdata&lt;/code&gt; on your local computer.  DO NOT RUN THESE COMMANDS LOCALLY!&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/bin/bash -ex
exec&amp;gt; &amp;gt;(tee /var/log/user-data.log|logger -t user -s 2&amp;gt;/dev/console) 2&amp;gt;&amp;amp;1
adminkey=$(GET instance-data/latest/meta-data/public-keys/ | 
  perl -ne 'print $1 if /^0=[^a-z0-9]*([-.@\w]*)/i')
cat &amp;lt;&amp;lt;EOF
SSHKEY:===================================================================
SSHKEY:HERE IS YOUR PUBLIC SSH KEY FOR KEYPAIR "$adminkey":
SSHKEY:$(cat /home/ubuntu/.ssh/authorized_keys)
SSHKEY:===================================================================
SSHKEY:Halting in 50min ($(date --date='+50 minutes' +"%Y-%m-%d %H:%M UTC"))
EOF
sleep 3000
halt
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Run a stock Ubuntu 10.04 LTS instance with the above file as a &lt;a href="http://alestic.com/2009/06/ec2-user-data-scripts"&gt;user-data script&lt;/a&gt;.  Specify the keypair for which you want to retrieve the public ssh key:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ec2-run-instances \
  --key YOURKEYPAIRHERE \
  --instance-type t1.micro \
  --instance-initiated-shutdown-behavior terminate \
  --user-data-file output-ssh-key.userdata \
  ami-ab36fbc2
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Keep requesting the console output from the instance until it shows your public ssh key.  Specify the instance id returned from the run-instances command:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ec2-get-console-output YOURINSTANCEID | grep SSHKEY: | cut -f3- -d:
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Repeat the above command a couple times a minute and within 2-10 minutes you will get output like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;===================================================================
HERE IS YOUR PUBLIC SSH KEY FOR KEYPAIR "erich":
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6rn8cl41CkzaH4ZBhczOJZaR4xBBDI1Kelc2ivzVvCB
THcdJRWpDd5I5hY5W9qke9Tm4fH3KaUVndlcP0ORGvS3PAL4lTpkS4D4goMEFrwMO8BG0NoE8sf2U/7g
aUkdcrDC7jzKYdwleRCI3uibNXiSdeG6RotClAAp7pMflDVp5WjjECDZ+8Jzs2wasdTwQYPhiWSiNcfb
fS97QdtROf0AcoPWElZAgmabaDFBlvvzcqxQRjNp/zbpkFHZBSKp+Sm4+WsRuLu6TDe9lb2Ps0xvBp1F
THlJRUVKP2yeZbVioKnOsXcjLfoJ9TEL7EMnPYinBMIE3kAYw3FzZZFeX3Q== erich
===================================================================
Halting in 50min (2011-12-20 05:58 UTC)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The temporary instance will automatically terminate itself in under an hour, but you can terminate it yourself if you&amp;#8217;d like to make sure that you aren&amp;#8217;t charged more than the two cents this will cost to run.&lt;/p&gt;

&lt;h2&gt;Notes&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If you currently have access to the private ssh key (not true in the above challenge) you can extract the public ssh key using a command like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ssh-keygen -y -f KEYFILE.pem
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;but that&amp;#8217;s obviously not as fun.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There is no way to retrieve the &lt;em&gt;private ssh key&lt;/em&gt; if you have lost it.  To protect your security, Amazon EC2 does not store a copy of this.  If you are looking to get access to an EC2 instance where you have lost the private ssh key, I recommend following the approach I wrote about in this article: &lt;a href="http://alestic.com/2011/02/ec2-fix-ebs-root"&gt;http://alestic.com/2011/02/ec2-fix-ebs-root&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In seemingly-related-but-not news, Scott Moser is working on &lt;a href="https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/893400"&gt;an enhancement to cloud-init&lt;/a&gt; (used by Ubuntu on EC2, Amazon Linux, and perhaps others) so that the &lt;em&gt;public ssh host keys&lt;/em&gt; are output to the console output on instance startup.  This cool feature will allow us to add the ssh host keys to our local known_hosts files, safely avoiding that pesky &lt;em&gt;&amp;#8220;Are you sure you want to continue connecting (yes/no)?&amp;#8221;&lt;/em&gt; warning.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

        

&lt;p&gt;
Original article: 
&lt;a href="http://alestic.com/2011/12/ec2-public-ssh-key"&gt;http://alestic.com/2011/12/ec2-public-ssh-key&lt;/a&gt;
&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/alestic/~4/S2phPfJZNKg" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://alestic.com/2011/12/ec2-public-ssh-key</feedburner:origLink></entry>

<entry>
    <title>Running EC2 Instances on a Recurring Schedule with Auto Scaling</title>
    <link rel="alternate" type="text/html" href="http://feeds.alestic.com/~r/alestic/~3/kpoYn0_2ElE/ec2-schedule-instance" />
    <id>tag:alestic.com,2011://1.132</id>

    <published>2011-11-15T13:00:00Z</published>
    <updated>2011-11-15T05:47:44Z</updated>

    <summary>Do you want to run short jobs on Amazon EC2 on a recurring schedule, but don’t want to pay for an instance running all the time? Would you like to do this using standard Amazon AWS services without needing an...</summary>
    <author>
        <name>Eric Hammond</name>
        <uri>https://plus.google.com/111045584683584396225/about</uri>
    </author>
    
        <category term="EC2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="PlanetUbuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ubuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="UbuntuCloud" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="autoscaling" label="Auto Scaling" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="cron" label="cron" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ec2" label="EC2" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="scheduling" label="scheduling" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ubuntu" label="Ubuntu" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="userdata" label="user-data" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="userdatascripts" label="user-data scripts" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://alestic.com/">
        &lt;p&gt;Do you want to run short jobs on Amazon EC2 on a recurring schedule, but
don&amp;#8217;t want to pay for an instance running all the time?&lt;/p&gt;

&lt;p&gt;Would you like to do this using standard Amazon AWS services without
needing an external server to run and terminate the instance?&lt;/p&gt;

&lt;p&gt;&lt;a href="http://aws.amazon.com/autoscaling/"&gt;Amazon EC2 Auto Scaling&lt;/a&gt; is normally used to keep a
reasonable number of instances running to handle measured or expected
load (e.g., web site traffic, queue processing).&lt;/p&gt;

&lt;p&gt;In this article I walk through the steps to create an Auto Scaling
configuration that runs an instance on a recurring schedule (e.g.,
four times a day) starting up a pre-defined task and letting that
instance shut itself down when it is finished.  We tweak the Auto
Scaling group so that this uses the minumum cost in instance run time,
even though we may not be able to predict in advance exactly how long
it will take to complete the job.&lt;/p&gt;

&lt;p&gt;Here&amp;#8217;s a high level overview for folks familiar with Auto Scaling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The instance is started using a recurring schedule action that
raises the min and max to 1.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The launch configuration is set to pass in a user-data script that
runs the desired job on first boot.  There&amp;#8217;s no need to build our
own AMI unless the software installation takes too long.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The user-data script runs shutdown at the end to move the instance
to the &amp;#8220;stopped&amp;#8221; state, suspending hourly run charges.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Another recurring schedule action lowers the min and max to 0.
This is done long after the job should have completed, just to
clean up the stopped instance or to terminate an instance that
perhaps failed to shut itself down.  It also resets the min/max
count so a new instance will be started the next time they are
raised.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The missing key I found through experimentation is that we need to
also suspend Auto Scaling&amp;#8217;s (usually valid) desire to replace any
unhealthy instances.  If we don&amp;#8217;t turn off this behavior, Auto Scaling
will start another instance as soon as the first one shuts itself
down, causing the job to be run over and over.&lt;/p&gt;

&lt;h2&gt;Prerequisites&lt;/h2&gt;

&lt;p&gt;The examples in this article assume that you have:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Installed and set up the EC2 command line tools&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Installed and set up the EC2 Auto Scaling command line tools&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tell EC2 about your ssh keys using the approach described here:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://alestic.com/2010/10/ec2-ssh-keys"&gt;Uploading Personal ssh Keys to Amazon EC2&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;User-data Script&lt;/h2&gt;

&lt;p&gt;The first step in setting up this process is to create a &lt;a href="http://alestic.com/2009/06/ec2-user-data-scripts"&gt;user-data
script&lt;/a&gt; that performs the tasks you want your scheduled
instance to execute each time it runs.&lt;/p&gt;

&lt;p&gt;This user-data script can do anything you want as long as it runs this
command after all the work has beeen completed:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;shutdown -h now
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I have created a &lt;a href="https://raw.github.com/alestic/demo-ec2-schedule-instance/master/user-data/demo-user-data-script.sh"&gt;demo user-data script&lt;/a&gt; for this article
which you can download to your local computer now, saving it as
&lt;code&gt;demo-user-data-script.sh&lt;/code&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;wget -q https://raw.github.com/alestic/demo-ec2-schedule-instance/master/user-data/demo-user-data-script.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;WARNING: Do not attempt to run this user-data script on your local computer!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Edit the downloaded &lt;code&gt;demo-user-data-script.sh&lt;/code&gt; file and change this
line at the top of the script to reflect your email address:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;EMAIL=youraddress@example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This demo user-data script:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Upgrades the Ubuntu instance&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Installs Postfix with a generic configuration so that it can send email&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sends you a demo informative message about the instance at the
email address you edited in the script.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sleeps for 5 minutes giving the email a chance to be delivered&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Shuts down the EC2 instance&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first time you run this demo, try using the script as it stands,
only changing your email address.  Then, try adjusting the script
little by little to make it do tasks that you would find more useful.&lt;/p&gt;

&lt;p&gt;If you&amp;#8217;d like, you can test the user-data script by itself running an
instance of Ubuntu 11.10.  Please update the AMI id to use the &lt;a href="http://alestic.com/"&gt;latest
release&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ami_id=ami-a7f539ce # Ubuntu 11.10 Oneiric server
ec2-run-instances \
  --key $USER \
  --instance-type t1.micro \
  --instance-initiated-shutdown-behavior terminate \
  --user-data-file demo-user-data-script.sh \
  $ami_id
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You should see an email from the instance and then it should terminate
itself about 5 minutes later.  Make sure you terminate it manually if
it stays running after 10 minutes.&lt;/p&gt;

&lt;h2&gt;Auto Scaling Group&lt;/h2&gt;

&lt;p&gt;With the user-data script in hand, we are now ready to create the Auto
Scaling setup.&lt;/p&gt;

&lt;p&gt;Set some variables used in the commands below.  Make sure you are
using the latest release of the appropriate AMI.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ami_id=ami-a7f539ce # Ubuntu 11.10 Oneiric server
region=us-east-1    # Region for running the demo

zone=${region}a     # A zone in that region
export EC2_URL=https://$region.ec2.amazonaws.com
export AWS_AUTO_SCALING_URL=https://autoscaling.$region.amazonaws.com
launch_config=demo-launch-config
auto_scale_group=demo-auto-scale-group
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This lauch configuration describes how we want our instance run each
time including the AMI id, instance type, ssh key, and most
importantly, our user-data script we edited above:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;as-create-launch-config \
  --key $USER \
  --instance-type t1.micro \
  --user-data-file demo-user-data-script.sh \
  --image-id $ami_id \
  --launch-config "$launch_config"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The Auto Scaling group keeps track of many things including how many
instances we want to have running, how they should be run (launch
config above), and what instances are currently running.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;as-create-auto-scaling-group \
  --auto-scaling-group "$auto_scale_group" \
  --launch-configuration "$launch_config" \
  --availability-zones "$zone" \
  --min-size 0 \
  --max-size 0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here&amp;#8217;s a non-obvious but key part of this approach!  Tell the Auto
Scaling group that we don&amp;#8217;t want it to restart our instance right
after the instance intentionally shuts down (or fails):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;as-suspend-processes \
  "$auto_scale_group" \
  --processes ReplaceUnhealthy
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now we&amp;#8217;re finally ready to tell EC2 Auto Scaling when we want to run
the instance launch configuration in the Auto Scaling group.&lt;/p&gt;

&lt;p&gt;Here&amp;#8217;s an example that starts one instance four times a day to run the
above user-data script:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# UTC: 1:00, 7:00, 13:00, 19:00
as-put-scheduled-update-group-action \
  --name "demo-schedule-start" \
  --auto-scaling-group "$auto_scale_group" \
  --min-size 1 \
  --max-size 1 \
  --recurrence "0 01,07,13,19 * * *"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And, we need to create a matching action to make sure the instance is
terminated at some point after the longest time the job could take.  For
this demo, we&amp;#8217;ll trigger it 55 minutes later, but it could just as
easily be 3 hours and 55 minutes later:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# UTC: 1:55, 7:55, 13:55, 19:55
as-put-scheduled-update-group-action \
  --name "demo-schedule-stop" \
  --auto-scaling-group "$auto_scale_group" \
  --min-size 0 \
  --max-size 0 \
  --recurrence "55 01,07,13,19 * * *"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The recurrence value is in a &lt;a href="http://en.wikipedia.org/wiki/Cron"&gt;cron format&lt;/a&gt; using UTC.  &lt;/p&gt;

&lt;p&gt;You are welcome to change the specs in the above commands to any time
you want to run the demo, especially if you don&amp;#8217;t want to wait up to
six hours for it to trigger.&lt;/p&gt;

&lt;p&gt;Before setting new schedules, make sure you delete the existing
schedule (see the next section).  Don&amp;#8217;t forget to make the stop
time(s) match up appropriately with the start time(s).&lt;/p&gt;

&lt;h2&gt;Clean up&lt;/h2&gt;

&lt;p&gt;Once you&amp;#8217;re done with this demo, you can delete the AWS resources we
created by following these steps:&lt;/p&gt;

&lt;p&gt;Delete the schedule start and stop actions:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;as-delete-scheduled-action \
  --force \
  --name "demo-schedule-start" \
  --auto-scaling-group "$auto_scale_group"
as-delete-scheduled-action \
  --force \
  --name "demo-schedule-stop" \
  --auto-scaling-group "$auto_scale_group"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Scale the Auto Scaling group down to zero instances.  This will
terminate any running instances:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;as-update-auto-scaling-group \
  "$auto_scale_group" \
  --min-size 0 \
  --max-size 0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Delete the Auto Scaling group&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;as-delete-auto-scaling-group \
  --force-delete \
  --auto-scaling-group "$auto_scale_group"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Delete the Auto Scaling launch config:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;as-delete-launch-config \
  --force \
  --launch-config "$launch_config"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You might now want to check to make sure nothing was left over.  This
works best in a wide terminal:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;as-describe-launch-configs --headers
as-describe-auto-scaling-groups --headers
as-describe-scheduled-actions --headers
as-describe-auto-scaling-instances --headers
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Timing&lt;/h2&gt;

&lt;p&gt;Everything takes a little time to filter through the system including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;scheduled action to raise min/max&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;triggering the start of an instance after a min/max is raised&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;starting an instance&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;booting an instance, installing software&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;running your job&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;shutting down an instance&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;scheduled action to lower min/max&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;triggering the termination of an instance after a min/max is lowered&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you set up the schedules, remember to make room for these
things. For example, don&amp;#8217;t schedule the termination of your instance
too early or it could kill your job before it has a chance to
complete.&lt;/p&gt;

&lt;h2&gt;Notes&lt;/h2&gt;

&lt;p&gt;Here are some great resources from Amazon for getting started with
and learning about Auto Scaling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://docs.amazonwebservices.com/AutoScaling/latest/GettingStartedGuide/"&gt;Auto Scaling Getting Started Guide&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://docs.amazonwebservices.com/AutoScaling/latest/DeveloperGuide/"&gt;Auto Scaling Developer Guide&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The user-data script logging uses the approach described here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://alestic.com/2010/12/ec2-user-data-output"&gt;Logging user-data Script Output on EC2 Instances&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Watching the output of the user-data script lets you monitor its
progress as well as debug where things might be going wrong.&lt;/p&gt;

&lt;p&gt;I haven&amp;#8217;t run the above approach except in testing, and would welcome
any pointers or improvements folks might have to offer.&lt;/p&gt;

        

&lt;p&gt;
Original article: 
&lt;a href="http://alestic.com/2011/11/ec2-schedule-instance"&gt;http://alestic.com/2011/11/ec2-schedule-instance&lt;/a&gt;
&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/alestic/~4/kpoYn0_2ElE" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://alestic.com/2011/11/ec2-schedule-instance</feedburner:origLink></entry>

<entry>
    <title>AWS Virtual MFA and the Google Authenticator for Android</title>
    <link rel="alternate" type="text/html" href="http://feeds.alestic.com/~r/alestic/~3/JxyT0wpRQXA/aws-virtual-mfa" />
    <id>tag:alestic.com,2011://1.131</id>

    <published>2011-11-03T03:41:00Z</published>
    <updated>2011-11-03T03:55:56Z</updated>

    <summary>Amazon just announced that the AWS MFA (multi-factor authentication) now supports virtual or software MFA devices in addition to the physical hardware MFA devices like the one that’s been taking up unwanted space in my pocket for two years. Multi-factor...</summary>
    <author>
        <name>Eric Hammond</name>
        <uri>https://plus.google.com/111045584683584396225/about</uri>
    </author>
    
        <category term="EC2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="PlanetUbuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ubuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="UbuntuCloud" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="aws" label="AWS" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ec2" label="EC2" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="googleauthenticator" label="Google Authenticator" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mfa" label="MFA" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="security" label="security" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="virtualmfa" label="Virtual MFA" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://alestic.com/">
        &lt;p&gt;Amazon &lt;a href="http://aws.typepad.com/aws/2011/11/new-virtual-software-multi-factor-authentication-rfc-6238-support.html"&gt;just announced&lt;/a&gt; that the AWS MFA (multi-factor authentication) now supports virtual or software MFA devices in addition to the physical hardware MFA devices like the one that&amp;#8217;s been taking up unwanted space in my pocket for two years.&lt;/p&gt;

&lt;p&gt;Multi-factor authentication means that in order to log in to my AWS account using the AWS console or portal (including the AWS forums) you not only need my secret password, you also need access to a device that I carry around with me.&lt;/p&gt;

&lt;p&gt;Before, this was a physical device attached to my key ring.  Now, this is my smart phone which has the virtual (software) MFA device on it.  I already carry my phone with me, so the software doesn&amp;#8217;t take up any additional space.&lt;/p&gt;

&lt;p&gt;To log in to AWS, I enter my password and then the current 6 digit access code displayed by the Android app on my phone.  These digits change every 30 seconds in an unguessable pattern, so this enhances the security of my AWS account.&lt;/p&gt;

&lt;p&gt;I started by using Amazon&amp;#8217;s AWS Virtual MFA app for my Android phone, but had some complaints about it including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You have to click on an account name to see the current digits instead of just having them shown when the app is run. There&amp;#8217;s nothing else for the app to do but show me these digits.  Just do it!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The digits disappear from the screen too fast.  Sometimes I want to glance back and see if I typed them in correctly, but they&amp;#8217;re gone and I have to click again, hoping that they haven&amp;#8217;t changed yet.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It&amp;#8217;s hard to choose your own account names so that you know which entry to use for different AWS accounts.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I then noticed some cryptic information in the announcements: the new feature will work with &amp;#8220;any application that supports the open OATH TOTP standard&amp;#8221;.&lt;/p&gt;

&lt;p&gt;Hmmm&amp;#8230;&lt;/p&gt;

&lt;p&gt;Sure &amp;#8216;nuff!  &lt;/p&gt;

&lt;p&gt;I already use the &lt;a href="https://market.android.com/details?id=com.google.android.apps.authenticator"&gt;Google Authenticator&lt;/a&gt; app on my Android phone so that my Google logins can use MFA.  As it turns out, Google Authenticator also works seamlessly with AWS Virtual MFA.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Google Authenticator shows the codes as soon as it is run with a little timer showing me when they will change.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Google Authenticator lets me easily edit the displayed name so that I know at a glance which code is for my personal AWS account and which one is for my company AWS account.  &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This also means that I only have to run one app to get access to my devices for Google accounts and for AWS accounts.  Amazon may improve their Android app over time, but by using open standards users can pick whatever works best for them at the time.&lt;/p&gt;

&lt;p&gt;I love the fact that Amazon now supports Virtual MFA.  I&amp;#8217;ve already thrown away my hardware token and my pocket feels less full.&lt;/p&gt;

&lt;p&gt;I love the fact that Amazon implemented this as a service based on existing standards so that I can use Google&amp;#8217;s Android app to access my account.&lt;/p&gt;

&lt;p&gt;I love open standards.&lt;/p&gt;

&lt;p&gt;Update:  I just found this great starting page which even links to Google Authenticator as a client for Android and iPhone:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;a href="http://aws.amazon.com/mfa/"&gt;http://aws.amazon.com/mfa/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

        

&lt;p&gt;
Original article: 
&lt;a href="http://alestic.com/2011/11/aws-virtual-mfa"&gt;http://alestic.com/2011/11/aws-virtual-mfa&lt;/a&gt;
&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/alestic/~4/JxyT0wpRQXA" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://alestic.com/2011/11/aws-virtual-mfa</feedburner:origLink></entry>

<entry>
    <title>Updated EBS boot AMIs for Ubuntu 8.04 Hardy on Amazon EC2 (2011-10-06)</title>
    <link rel="alternate" type="text/html" href="http://feeds.alestic.com/~r/alestic/~3/EsmOG7yhAMA/ec2-hardy-ebs" />
    <id>tag:alestic.com,2011://1.130</id>

    <published>2011-10-08T03:45:00Z</published>
    <updated>2011-10-07T10:24:47Z</updated>

    <summary>Canonical has released updated instance-store AMIs for Ubuntu 8.04 LTS Hardy on Amazon EC2. Read Ben Howard’s announcement on the ec2ubuntu Google group. I have released corresponding EBS boot AMIs for Ubuntu 8.04 LTS Hardy using the exact same image...</summary>
    <author>
        <name>Eric Hammond</name>
        <uri>https://plus.google.com/111045584683584396225/about</uri>
    </author>
    
        <category term="EC2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="PlanetUbuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ubuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="UbuntuCloud" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="804" label="8.04" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ami" label="AMI" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="amis" label="AMIs" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ebsboot" label="EBS boot" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ec2" label="EC2" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="hardy" label="Hardy" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="image" label="image" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="images" label="images" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="instancestore" label="instance-store" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ubuntu" label="Ubuntu" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://alestic.com/">
        &lt;p&gt;Canonical has released updated instance-store AMIs for Ubuntu 8.04 LTS Hardy on Amazon EC2. Read &lt;a href="http://groups.google.com/group/ec2ubuntu/browse_thread/thread/f564626478aa117"&gt;Ben Howard&amp;#8217;s announcement&lt;/a&gt; on the ec2ubuntu Google group.&lt;/p&gt;

&lt;p&gt;I have released corresponding EBS boot AMIs for Ubuntu 8.04 LTS Hardy using the exact same image Canonical used to build the instance-store AMIs.&lt;/p&gt;

&lt;p&gt;You can find the AMI ids for Canonical&amp;#8217;s AMIs and for the AMIs I just built in the table at the top of &lt;a href="http://alestic.com"&gt;Alestic.com&lt;/a&gt;. Just click on the region you are using to see the ids.&lt;/p&gt;

&lt;p&gt;The updated code I used to build the EBS boot AMIs by downloading Canonical&amp;#8217;s images is &lt;a href="https://github.com/alestic/alestic-hardy-ebs"&gt;available on github&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you&amp;#8217;re not already using the venerable Ubuntu Hardy, please start with a more modern release, like Ubuntu 10.04 LTS Lucid or Ubuntu 11.04 Natty.&lt;/p&gt;

        

&lt;p&gt;
Original article: 
&lt;a href="http://alestic.com/2011/10/ec2-hardy-ebs"&gt;http://alestic.com/2011/10/ec2-hardy-ebs&lt;/a&gt;
&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/alestic/~4/EsmOG7yhAMA" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://alestic.com/2011/10/ec2-hardy-ebs</feedburner:origLink></entry>

<entry>
    <title>New Release of Alestic Git Server</title>
    <link rel="alternate" type="text/html" href="http://feeds.alestic.com/~r/alestic/~3/qyKZkglvvz4/ec2-git-server-release" />
    <id>tag:alestic.com,2011://1.129</id>

    <published>2011-10-05T01:13:36Z</published>
    <updated>2011-10-05T01:44:44Z</updated>

    <summary>New AMIs have been released for the Alestic Git Server. Major upgrade points include: Base operating system upgraded to Ubuntu 11.04 Natty Git upgraded to version 1.7.4.1 gitolite upgraded to version 2.1 (master branch) You can find the latest Alestic...</summary>
    <author>
        <name>Eric Hammond</name>
        <uri>https://plus.google.com/111045584683584396225/about</uri>
    </author>
    
        <category term="EC2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="PlanetUbuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ubuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="UbuntuCloud" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="alesticgitserver" label="Alestic Git Server" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ec2" label="EC2" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="git" label="Git" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="gitolite" label="gitolite" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ubuntu" label="ubuntu" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://alestic.com/">
        &lt;p&gt;New AMIs have been released for the &lt;a href="http://alestic.com/alestic-git/"&gt;Alestic Git Server&lt;/a&gt;.  Major upgrade points include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Base operating system upgraded to Ubuntu 11.04 Natty&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Git upgraded to version 1.7.4.1&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;gitolite upgraded to version 2.1 (master branch)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can find the latest Alestic Git Server AMI ids and documentation at:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;a href="http://alestic.com/alestic-git/"&gt;http://alestic.com/alestic-git/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Questions and comments are welcomed on the &lt;a href="http://groups.google.com/group/alestic-git"&gt;Alestic Git group&lt;/a&gt;.&lt;/p&gt;

        

&lt;p&gt;
Original article: 
&lt;a href="http://alestic.com/2011/10/ec2-git-server-release"&gt;http://alestic.com/2011/10/ec2-git-server-release&lt;/a&gt;
&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/alestic/~4/qyKZkglvvz4" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://alestic.com/2011/10/ec2-git-server-release</feedburner:origLink></entry>

<entry>
    <title>Using ServerFault.com for Amazon EC2 Q&amp;A</title>
    <link rel="alternate" type="text/html" href="http://feeds.alestic.com/~r/alestic/~3/QN6pCxZ5_bw/ec2-serverfault" />
    <id>tag:alestic.com,2011://1.127</id>

    <published>2011-09-26T20:45:00Z</published>
    <updated>2011-10-03T21:06:50Z</updated>

    <summary>The Amazon EC2 Forum has been around since the beginning of EC2 and has always been a place where you can get your EC2 questions in front of an audience of experts and Amazon employees. Though I’m still listed as...</summary>
    <author>
        <name>Eric Hammond</name>
        <uri>https://plus.google.com/111045584683584396225/about</uri>
    </author>
    
        <category term="EC2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="PlanetUbuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ubuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="UbuntuCloud" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="ec2" label="EC2" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="serverfault" label="ServerFault" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="stackexchange" label="StackExchange" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="support" label="support" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://alestic.com/">
        &lt;p&gt;The &lt;a href="https://forums.aws.amazon.com/forum.jspa?forumID=30&amp;amp;start=0"&gt;Amazon EC2 Forum&lt;/a&gt; has been around since the beginning of EC2 and has always been a place where you can get your EC2 questions in front of an audience of experts and Amazon employees.  &lt;/p&gt;

&lt;p&gt;Though I&amp;#8217;m still listed as one of the top posters (scored by questioners marking my answers as helpful) I&amp;#8217;ve slowed down my activity on that forum due to the sheer volume of support requests, many of which are commonly asked questions or things that only Amazon can help with.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve started answering Amazon EC2 related questions on Stack Exchange sites like Server Fault, a place where system administrators can get questions answered by experts.  Here&amp;#8217;s my profile on serverfault which linkes to answers I&amp;#8217;ve posted. Click &amp;#8220;newest&amp;#8221; to see the most recent.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;a href="http://serverfault.com/users/30542/eric-hammond"&gt;http://serverfault.com/users/30542/eric-hammond&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you use an RSS reader, you can follow a feed for all questions tagged amazon-ec2:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;[RSS] &lt;a href="http://serverfault.com/feeds/tag/amazon-ec2"&gt;http://serverfault.com/feeds/tag/amazon-ec2&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can even follow all new answers posted by an individual like, say, that Eric Hammond fellow:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;[RSS] &lt;a href="http://serverfault.com/feeds/user/30542"&gt;http://serverfault.com/feeds/user/30542&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

        

&lt;p&gt;
Original article: 
&lt;a href="http://alestic.com/2011/09/ec2-serverfault"&gt;http://alestic.com/2011/09/ec2-serverfault&lt;/a&gt;
&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/alestic/~4/QN6pCxZ5_bw" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://alestic.com/2011/09/ec2-serverfault</feedburner:origLink></entry>

<entry>
    <title>Rebooting vs. Stop/Start of Amazon EC2 Instance</title>
    <link rel="alternate" type="text/html" href="http://feeds.alestic.com/~r/alestic/~3/MOdE8w9rsVc/ec2-reboot-stop-start" />
    <id>tag:alestic.com,2011://1.126</id>

    <published>2011-09-24T14:00:00Z</published>
    <updated>2011-11-22T01:32:59Z</updated>

    <summary>When you reboot a physical computer at your desk it is very similar to shutting down the system, and booting it back up. With Amazon EC2, rebooting an instance is much the same as with a local physical computer, but...</summary>
    <author>
        <name>Eric Hammond</name>
        <uri>https://plus.google.com/111045584683584396225/about</uri>
    </author>
    
        <category term="EC2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="PlanetUbuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ubuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="UbuntuCloud" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="ebsboot" label="EBS boot" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ec2" label="EC2" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="instances" label="instances" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="reboot" label="reboot" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="start" label="start" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="stop" label="stop" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="terminate" label="terminate" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ubuntu" label="Ubuntu" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://alestic.com/">
        &lt;p&gt;When you reboot a physical computer at your desk it is very similar to shutting down the system, and booting it back up.  With Amazon EC2, rebooting an instance is much the same as with a local physical computer, but a stop/start differs in a few keys ways that may cause some problems and definitely have some benefits.&lt;/p&gt;

&lt;p&gt;When you stop an EBS boot instance you are giving up the physical hardware that the server was running on and EC2 is free to start somebody else&amp;#8217;s instance there.&lt;/p&gt;

&lt;p&gt;Your EBS boot volume (and other attached EBS volumes) are still preserved, though they aren&amp;#8217;t really tied to a physical or virtual server. They are just associated with an instance id that isn&amp;#8217;t running anywhere.&lt;/p&gt;

&lt;p&gt;When you start the instance again, EC2 picks some hardware to run it on, ties in the EBS volume(s) and boots it up again.&lt;/p&gt;

&lt;p&gt;Things that change when you stop/start include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;New internal IP address (though could randomly be the same).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;New external IP address (though could randomly be the same).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If an Elastic IP address was associated with the instance before it was stopped, then you&amp;#8217;ll need to re-associate it after the start. (Behavior may differ with VPC instances.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Any contents on the instance&amp;#8217;s former ephemeral storage were wiped and you are given fresh ephemeral storage (often mounted as /mnt).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can leave an instance stopped for as long as you like and not get charged for run time (though you do get charged at a much lower rate for the EBS volume storage).  See the next point.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A fresh billing hour is started for the instance when you start it again. E.g., if you start a new instance and then stop/start it 3 times within the first 60 minutes, you&amp;#8217;ll get charged for 4 hours instead of 1.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There is a small chance that EC2 will not have available slots of the correct instance type to run your instance when you want to start it again. I&amp;#8217;ve had this happen and temporarily switched to a different, available instance type to get it running again.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When you reboot, it&amp;#8217;s a simple reboot at the OS level and the instance stays running on the same hardware, with the same private and public IP addresses, keeps the same Elastic IP address (if associated), and keeps the same ephemeral storage without getting wiped. No new billing hour is started on a reboot and you do not give up the instance hardware.&lt;/p&gt;

&lt;p&gt;While an instance is stopped, you can do some cool things before starting it again. Here&amp;#8217;s an article I wrote on changing the instance type of an instance while it&amp;#8217;s stopped:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;a href="http://alestic.com/2011/02/ec2-change-type"&gt;Moving an EC2 Instance to a Larger Size&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here&amp;#8217;s an article I wrote on how to change the size of an EBS boot disk of an instance while it&amp;#8217;s stopped:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;a href="http://alestic.com/2010/02/ec2-resize-running-ebs-root"&gt;Resizing the Root Disk on a Running EBS Boot EC2 Instance&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here&amp;#8217;s an article I wrote on how to examine the root disk of an instance (while it&amp;#8217;s stopped) when you can&amp;#8217;t connect to it while it&amp;#8217;s runnning:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;a href="http://alestic.com/2011/02/ec2-fix-ebs-root"&gt;Fixing Files on the Root EBS Volume of an EC2 Instance&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Since the stop/start cycle has a good chance of moving your instance to new hardware, it&amp;#8217;s an easy way to replace your instance hardware if you suspect that the current platform might be going bad and causing problems. Here&amp;#8217;s an article I wrote about that:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;a href="http://alestic.com/2011/02/ec2-move-hardware"&gt;A Simpler Way To Replace Instance Hardware on EC2&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Warning: &amp;#8220;Stopping&amp;#8221; an instance is completely different from &amp;#8220;terminating&amp;#8221; an instance!  When you terminate an EC2 instance, by default it deletes the EBS boot volume and other volumes that were created at run time.  Make sure you understand the difference before you start doing one or the other.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;[I originally posted this article as an answer to a serverfault question, but liked it enough to archive it on this blog.]&lt;/p&gt;

        

&lt;p&gt;
Original article: 
&lt;a href="http://alestic.com/2011/09/ec2-reboot-stop-start"&gt;http://alestic.com/2011/09/ec2-reboot-stop-start&lt;/a&gt;
&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/alestic/~4/MOdE8w9rsVc" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://alestic.com/2011/09/ec2-reboot-stop-start</feedburner:origLink></entry>

<entry>
    <title>Upper Limits on Number of Amazon EC2 Instances by Region</title>
    <link rel="alternate" type="text/html" href="http://feeds.alestic.com/~r/alestic/~3/kA-tidkNgRI/ec2-max-instances" />
    <id>tag:alestic.com,2011://1.125</id>

    <published>2011-08-15T14:00:00Z</published>
    <updated>2011-12-27T23:26:35Z</updated>

    <summary>[Update: As predicted, these numbers are already out of date and Amazon has added more public IP address ranges for use by EC2 in various regions.] Each standard Amazon EC2 instance has a public IP address. This is true for...</summary>
    <author>
        <name>Eric Hammond</name>
        <uri>https://plus.google.com/111045584683584396225/about</uri>
    </author>
    
        <category term="EC2" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="PlanetUbuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ubuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="UbuntuCloud" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="amazon" label="Amazon" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="aws" label="AWS" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ec2" label="EC2" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="instances" label="instances" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ipaddresses" label="IP addresses" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="research" label="research" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://alestic.com/">
        &lt;p&gt;&lt;font color="red"&gt;[Update: As predicted, these numbers are already out of date and Amazon has added more public IP address ranges for use by EC2 in various regions.]&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;Each standard Amazon EC2 instance has a public IP address.  This is true for normal instances when they are first brought up and for instances which have had elastic IP addresses assigned to them.  Your EC2 instance still has a public IP address even if you have configured the security group so that it cannot be contacted from the Internet, which happens to be the default setting for security groups.&lt;/p&gt;

&lt;p&gt;Amazon has made public the &lt;a href="https://forums.aws.amazon.com/ann.jspa?annID=1252"&gt;EC2 IP address ranges&lt;/a&gt; that may be in use for each region.&lt;/p&gt;

&lt;p&gt;From this information, we can calculate the absolute upper limit for the number of concurrently running standard EC2 instances that could possibly be supported in each region.  At the time of this writing I calculate the hard upper limits to be:&lt;/p&gt;

&lt;table class="amis"&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;EC2 Region&lt;/th&gt;&lt;th&gt;Max Instances*&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;us-east-1&lt;/td&gt;&lt;td&gt;585,704&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;us-west-1&lt;/td&gt;&lt;td&gt;98,298&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;eu-west-1&lt;/td&gt;&lt;td&gt;135,156&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;ap-southeast-1&lt;/td&gt;&lt;td&gt;43,000&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;ap-northeast-1&lt;/td&gt;&lt;td&gt;34,808&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th colspan="2"&gt;&lt;/th&gt;&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;*Caveats:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;An upper limit based on the IP address ranges does not tell you what the real number of possible instances is in a given EC2 region.  It&amp;#8217;s just an upper limit.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Amazon is sure to keep requesting, reserving, and announcing more IP addresses than is actively needed by EC2 at any point in time.  Only they know the growth buffer percentage that they like to maintain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Amazon may need to use different ranges of IP addresses for different groups of instances in different parts of their network, even in the same data center or availability zone, so they may publish and start using new ranges of IP addresses even before they are even near using up the capacity of previous ranges.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Amazon is free to add new IP address blocks to the list at any time as they keep growing, and they do.  The specific numbers above could be out of date by the time you read this.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There are probably some IP addresses in each range that are reserved for various networking devices and protocols.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This calculation is for concurrently running EC2 instances.  Many instances run for just a few minutes or hours and another instance, perhaps for another customer, can start up and use that same IP address moments later.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;EC2 instances running inside &lt;a href="http://aws.amazon.com/vpc/"&gt;Amazon VPC&lt;/a&gt; don&amp;#8217;t necessarily use up an external IP address in Amazon&amp;#8217;s EC2 public IP address ranges, so they are not included in the upper limits.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I am not a networking expert.  I only play one at my startup.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Anything else I&amp;#8217;m missing?&lt;/p&gt;

&lt;p&gt;[Update 2012-12-27: Correct URL for Amazon&amp;#8217;s latest IP address list.]&lt;/p&gt;

        

&lt;p&gt;
Original article: 
&lt;a href="http://alestic.com/2011/08/ec2-max-instances"&gt;http://alestic.com/2011/08/ec2-max-instances&lt;/a&gt;
&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/alestic/~4/kA-tidkNgRI" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://alestic.com/2011/08/ec2-max-instances</feedburner:origLink></entry>

</feed>

