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

<channel>
	<title>dKaiser &#187; Amazon AWS</title>
	<atom:link href="http://www.dkaiser.com/blog/category/amazonaws/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dkaiser.com/blog</link>
	<description>- Experiments with Clouds</description>
	<lastBuildDate>Mon, 30 Jan 2012 20:23:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Recovering a non responsive AWS instance</title>
		<link>http://www.dkaiser.com/blog/recovering-a-non-responsive-aws-instance?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=recovering-a-non-responsive-aws-instance</link>
		<comments>http://www.dkaiser.com/blog/recovering-a-non-responsive-aws-instance#comments</comments>
		<pubDate>Mon, 30 Jan 2012 20:23:20 +0000</pubDate>
		<dc:creator>Pauli Haikonen</dc:creator>
				<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[Recovery]]></category>
		<category><![CDATA[EBS]]></category>

		<guid isPermaLink="false">http://www.dkaiser.com/blog/?p=229</guid>
		<description><![CDATA[TweetI could not ssh in to one of my AWS instances last evening and it wasn’t serving any pages either. AWS management console said it was up, though. Rebooting did not help. The second reboot did not help either. Shutdown and start did not help. I was running out of tricks here! For some reason, [...]]]></description>
			<content:encoded><![CDATA[<div class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Frecovering-a-non-responsive-aws-instance&amp;text=Recovering%20a%20non%20responsive%20AWS%20instance&amp;related=&amp;lang=en&amp;count=&amp;counturl=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Frecovering-a-non-responsive-aws-instance" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dkaiser.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>I could not ssh in to one of my AWS instances last evening and it wasn’t serving any pages either. AWS management console said it was up, though. Rebooting did not help. The second reboot did not help either. Shutdown and start did not help. I was running out of tricks here!</p>
<p>For some reason, the instance had been running on 100% CPU utilization for days:</p>
<p style="text-align: center;"><a href="http://www.dkaiser.com/blog/wp-content/uploads//2012/01/Screen-shot-2012-01-30-at-9.53.18-PM-1.png"><img class="aligncenter size-full wp-image-230" title="Screen shot 2012-01-30 at 9.53.18 PM 1" src="http://www.dkaiser.com/blog/wp-content/uploads//2012/01/Screen-shot-2012-01-30-at-9.53.18-PM-1.png" alt="" width="600" height="380" /></a></p>
<p>(I better do some monitoring in future!)</p>
<p>Even though the CPU usage had dropped after the restarting, the instance would not accept any connections. The only thing I could think of was to either ping the AWS forum, or to get the running volume on some new instance as the instance was an EBS based one. I decided to go with the new volume if the database would not mind too much. Steps I needed to do were:</p>
<ol>
<li>Snapshot the running volume</li>
<li>Create a new volume out of the snapshot on the same availability zone</li>
<li>Start a new instance with the Launch more like this</li>
<li>Shutdown the new instance</li>
<li>Detach the volume on the new instance</li>
<li>Attach the volume which was created from the snapshot to new instance (need to have the correct  attachment information, like /dev/sda1)</li>
<li>Start the new instance</li>
<li>Disassociate the Elastic IP from the old instance</li>
<li>Associate the correct Elastic IP on the new instance</li>
<li>Test and wish for the best</li>
</ol>
<p>This actually worked and did not even take too much time. Actually, really cool when thinking about this and imagining I would have had a physical server instead&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dkaiser.com/blog/recovering-a-non-responsive-aws-instance/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AWS reboots, oh the drama</title>
		<link>http://www.dkaiser.com/blog/aws-reboots-oh-the-drama?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=aws-reboots-oh-the-drama</link>
		<comments>http://www.dkaiser.com/blog/aws-reboots-oh-the-drama#comments</comments>
		<pubDate>Thu, 08 Dec 2011 20:35:30 +0000</pubDate>
		<dc:creator>Pauli Haikonen</dc:creator>
				<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[AWS reboots]]></category>

		<guid isPermaLink="false">http://www.dkaiser.com/blog/?p=215</guid>
		<description><![CDATA[TweetI, as well as many others, received today an email from Amazon about the need to reboot one of my instances. Actually, Twitter was already aware of this and was a bit upset of the need. For me, this was the second time since 2009 when Amazon has asked to reboot one of my instances. [...]]]></description>
			<content:encoded><![CDATA[<div class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Faws-reboots-oh-the-drama&amp;text=AWS%20reboots%2C%20oh%20the%20drama&amp;related=&amp;lang=en&amp;count=&amp;counturl=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Faws-reboots-oh-the-drama" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dkaiser.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>I, as well as many others, received today an email from Amazon about the need to reboot one of my instances. Actually, Twitter was already aware of <a href="https://twitter.com/#!/search/aws%20reboot">this</a> and was a bit upset of the need. For me, this was the second time since 2009 when Amazon has asked to reboot one of my instances. Once the HW was degraded and now this. I would say it&#8217;s quite a decent score since I have averaged something like five instances running all the time. </p>
<p>I am not upset, on the contrary I am happy AWS keeping the infrastructure up to date, be the reason for the reboot what ever. Besides, the systems should be designed so, that rebooting an instance should not take the service down, if you don&#8217;t accept it (like I do). </p>
<p>The actual process how AWS did inform the customers did feel ok. At first it was of course just rumours, but then I received an email stating the need which gave an acceptable time to react. When I logged in to the AWS Dashboard, I saw this kind of a message:</p>
<p><a href="http://www.dkaiser.com/blog/wp-content/uploads//2011/12/Screen-shot-2011-12-08-at-9.50.20-PM.png"><img src="http://www.dkaiser.com/blog/wp-content/uploads//2011/12/Screen-shot-2011-12-08-at-9.50.20-PM-300x48.png" alt="Scheduled Events" title="Screen shot 2011-12-08 at 9.50.20 PM" width="300" height="48" class="aligncenter size-medium wp-image-216" /></a></p>
<p>Which had a link to further information:</p>
<p><a href="http://www.dkaiser.com/blog/wp-content/uploads//2011/12/Screen-shot-2011-12-08-at-9.54.31-PM2.png"><img src="http://www.dkaiser.com/blog/wp-content/uploads//2011/12/Screen-shot-2011-12-08-at-9.54.31-PM2-300x81.png" alt="" title="Screen shot 2011-12-08 at 9.54.31 PM" width="300" height="81" class="aligncenter size-medium wp-image-225" /></a></p>
<p>And even more information:</p>
<p><a href="http://www.dkaiser.com/blog/wp-content/uploads//2011/12/Screen-shot-2011-12-08-at-9.54.17-PM.png"><img src="http://www.dkaiser.com/blog/wp-content/uploads//2011/12/Screen-shot-2011-12-08-at-9.54.17-PM-300x170.png" alt="" title="Screen shot 2011-12-08 at 9.54.17 PM" width="300" height="170" class="aligncenter size-medium wp-image-218" /></a></p>
<p>There was an option to do the reboot right now if I wanted, so I did it. At first after the reboot, I was looking at the instance in the dashboard, but the notification icon was still there. I would have thought it would disappear. Then I had a look of the details of the event and it actually had [Completed] written infront of the event:</p>
<p><a href="http://www.dkaiser.com/blog/wp-content/uploads//2011/12/Screen-shot-2011-12-08-at-9.58.22-PM1.png"><img src="http://www.dkaiser.com/blog/wp-content/uploads//2011/12/Screen-shot-2011-12-08-at-9.58.22-PM1-300x86.png" alt="" title="Screen shot 2011-12-08 at 9.58.22 PM" width="300" height="86" class="aligncenter size-medium wp-image-226" /></a></p>
<p>Which now probably means it&#8217;s ok and I am done with this. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dkaiser.com/blog/aws-reboots-oh-the-drama/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My new best AWS feature, CloudFormation</title>
		<link>http://www.dkaiser.com/blog/my-new-best-aws-feature-cloudformation?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=my-new-best-aws-feature-cloudformation</link>
		<comments>http://www.dkaiser.com/blog/my-new-best-aws-feature-cloudformation#comments</comments>
		<pubDate>Sat, 19 Nov 2011 13:06:48 +0000</pubDate>
		<dc:creator>Pauli Haikonen</dc:creator>
				<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[CloudFormation]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[EC2]]></category>

		<guid isPermaLink="false">http://www.dkaiser.com/blog/?p=206</guid>
		<description><![CDATA[TweetI just realized AWS has a feature called the CloudFormation which allows users to script their technology stack in a convenient and easily understood JSON formatted text files which can then be used to deploy the stack over and over again, always the same way. Fantastic! This eases a the burden of managing a bunch [...]]]></description>
			<content:encoded><![CDATA[<div class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Fmy-new-best-aws-feature-cloudformation&amp;text=My%20new%20best%20AWS%20feature%2C%20CloudFormation&amp;related=&amp;lang=en&amp;count=&amp;counturl=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Fmy-new-best-aws-feature-cloudformation" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dkaiser.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>I just realized AWS has a feature called the <a href="http://aws.amazon.com/cloudformation">CloudFormation</a> which allows users to script their technology stack in a convenient and easily understood JSON formatted text files which can then be used to deploy the stack over and over again, always the same way. Fantastic! This eases a the burden of managing a bunch of customized AMIs or other ways of having some custom features introduced to the AMIs. I wonder how I did not notice this feature before. It even has a tab in the AWS Management Console. There are also some <a href="http://aws.amazon.com/cloudformation/aws-cloudformation-templates/">sample</a> templates which for example install Drupal or a basic Ruby Hello World example. </p>
<p>As a test, I ran the Drupal installation script and I have to say this was by far the easiest Drupal installation I have ever done. <a href="http://www.dkaiser.com/blog/wp-content/uploads//2011/11/Screen-shot-2011-11-18-at-11.14.09-PM.png"><img src="http://www.dkaiser.com/blog/wp-content/uploads//2011/11/Screen-shot-2011-11-18-at-11.14.09-PM-300x297.png" alt="" title="Screen shot 2011-11-18 at 11.14.09 PM" width="300" height="297" class="aligncenter size-medium wp-image-207" /></a><a href="http://www.dkaiser.com/blog/wp-content/uploads//2011/11/Screen-shot-2011-11-18-at-11.16.08-PM.png"><img src="http://www.dkaiser.com/blog/wp-content/uploads//2011/11/Screen-shot-2011-11-18-at-11.16.08-PM-300x112.png" alt="" title="Screen shot 2011-11-18 at 11.16.08 PM" width="300" height="112" class="aligncenter size-medium wp-image-208" /></a><a href="http://www.dkaiser.com/blog/wp-content/uploads//2011/11/Screen-shot-2011-11-18-at-11.23.55-PM.png"><img src="http://www.dkaiser.com/blog/wp-content/uploads//2011/11/Screen-shot-2011-11-18-at-11.23.55-PM-300x180.png" alt="" title="Screen shot 2011-11-18 at 11.23.55 PM" width="300" height="180" class="aligncenter size-medium wp-image-209" /></a>From start to finish in 5 minutes where most of it was just waiting for the deploy to finish. Absolutely great! Minor thing might be to remember that the security keys are not available in all the Regions, at least not in US East (Virginia) my keys were not available which caused the stack deployment to fail without any good reason except key was not found… I was of course first thinking of a typo in the key name. The other thing is that the user must know the instance type name, such as t1.micro while a drop down menu would be great.</p>
<p>There is also a possibility to modify an existing stack which is actually a relatively new feature. This makes it even more usable. It would be interesting to see if I could do a stack for a simple Aegir installation as lately that&#8217;s the platform I have been installing the most and doing the <a href="http://community.aegirproject.org/node/389">manual installation</a> has become kind of boring. CloudFormation would help lot with that!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dkaiser.com/blog/my-new-best-aws-feature-cloudformation/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amazon Web Services used in Sony PSN attack</title>
		<link>http://www.dkaiser.com/blog/amazon-web-services-used-in-sony-psn-attack?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=amazon-web-services-used-in-sony-psn-attack</link>
		<comments>http://www.dkaiser.com/blog/amazon-web-services-used-in-sony-psn-attack#comments</comments>
		<pubDate>Mon, 16 May 2011 17:02:42 +0000</pubDate>
		<dc:creator>Pauli Haikonen</dc:creator>
				<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[attack]]></category>
		<category><![CDATA[Bloomberg]]></category>
		<category><![CDATA[PSN]]></category>

		<guid isPermaLink="false">http://www.dkaiser.com/blog/?p=199</guid>
		<description><![CDATA[TweetToday’s breaking news have been Bloomberg’s story about the Sony PSN attack been conducted by using Amazon Web Services. I read the story and feel confused, like how on earth can the source of the servers be any kind of relevancy if they’ve been using a public cloud provider? Come on, Amazon can’t and really [...]]]></description>
			<content:encoded><![CDATA[<div class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Famazon-web-services-used-in-sony-psn-attack&amp;text=Amazon%20Web%20Services%20used%20in%20Sony%20PSN%20attack&amp;related=&amp;lang=en&amp;count=&amp;counturl=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Famazon-web-services-used-in-sony-psn-attack" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dkaiser.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>Today’s breaking <a href="http://www.bloomberg.com/news/2011-05-15/sony-attack-shows-amazon-s-cloud-service-lures-hackers-at-pennies-an-hour.html">news</a> have been Bloomberg’s story about the Sony PSN attack been conducted by using Amazon Web Services. I read the story and feel confused, like how on earth can the source of the servers be any kind of relevancy if they’ve been using a public cloud provider? Come on, Amazon can’t and really should not, follow what their customers do with their servers. This whole thing Bloomberg is writing about is like saying the bank was robbed by a Smith&#038;Wesson and it was Smith&#038;Wesson’s fault.</p>
<p>Of course, there will be a subpoena for getting all the information of the account used in managing the account and I guess they had to use some stolen credit card as well which is interesting. Also, the statement in the Bloomberg’s article about anyone anonymously going and getting an account in AWS is kind of not totally true. Maybe it can be managed somehow if using a stolen credit card, but it’s not an anonymous service as such. And how are you going to prevent that “flaw” in the system of the possibility using stolen cards and false identities? Scan your id and send that as well or visit them at AWS personally? Huh?</p>
<p>In the end of the article, there is a thought-provoking paragraph of “Rethinking the Cloud” because a cloud can be used also for malicious purposes. Yep. I’ll do think about this for a while&#8230;</p>
<p>Thinking&#8230;</p>
<p>Thinking&#8230;</p>
<p>&#8230;and it should not matter for the most parts. Say, the whole AWS would be used only for attacks and the service level would degrade and my IPs would be black listed, then I probably would switch to some other provider, but, right now, I am not worried the least bit. I have my application and the service level I need in a good and healthy balance.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dkaiser.com/blog/amazon-web-services-used-in-sony-psn-attack/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>US-EAST-1 region outage 21st of April</title>
		<link>http://www.dkaiser.com/blog/us-east-1-region-outage-21st-of-april?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=us-east-1-region-outage-21st-of-april</link>
		<comments>http://www.dkaiser.com/blog/us-east-1-region-outage-21st-of-april#comments</comments>
		<pubDate>Thu, 21 Apr 2011 20:36:29 +0000</pubDate>
		<dc:creator>Pauli Haikonen</dc:creator>
				<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[Recovery]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[James Hamilton AWS]]></category>
		<category><![CDATA[outage]]></category>
		<category><![CDATA[Quora]]></category>
		<category><![CDATA[Reddit]]></category>
		<category><![CDATA[US-EAST-1]]></category>

		<guid isPermaLink="false">http://www.dkaiser.com/blog/?p=190</guid>
		<description><![CDATA[TweetQuora is down, Reddit is in emergency read only mode. Quite severe this is then! According to the first investigation (from the AWS health dashboard) the reason for outage was a networking event which caused a large number of EBS volumes being re-mirrored. This caused capacity problems in the affected region. Also there were problems [...]]]></description>
			<content:encoded><![CDATA[<div class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Fus-east-1-region-outage-21st-of-april&amp;text=US-EAST-1%20region%20outage%2021st%20of%20April%20&amp;related=&amp;lang=en&amp;count=&amp;counturl=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Fus-east-1-region-outage-21st-of-april" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dkaiser.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p><!-- p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px} -->Quora is down, Reddit is in emergency read only mode. Quite severe this is then!</p>
<p>According to the first investigation (from the <a href="http://status.aws.amazon.com/" target="_blank">AWS health dashboard</a>) the reason for outage was a networking event which caused a large number of EBS volumes being re-mirrored. This caused capacity problems in the affected region. Also there were problems with one control plane which made it difficult to create new EBS volumes and instances. <a href="http://en.wikipedia.org/wiki/Routing_control_plane" target="_blank">Control plane</a> is a piece of router architecture which is responsible of drawing the network map, if you did not know it… I certainly did not know before.</p>
<p>Of course, there are plenty of other services impacted by the outage and I guess this is a great time to see how different services have been designed to sustain a degradation of some underlying components. Quora is totally dead (well, there is the notification to users) and Reddit is in read only mode. I give my points to Reddit as they have managed to fail gracefully to a cached read only mode.</p>
<p>Funny thing, just today I was reading a <a href="http://www.usenix.org/event/lisa07/tech/full_papers/hamilton/hamilton_html/" target="_blank">text</a> by James Hamilton which is spot on this situation. I need to say I am surprised Quora did not have a fail over to a different location as the other location in US seems to be ok.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dkaiser.com/blog/us-east-1-region-outage-21st-of-april/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with Amazon Route 53</title>
		<link>http://www.dkaiser.com/blog/working-with-amazon-route-53?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=working-with-amazon-route-53</link>
		<comments>http://www.dkaiser.com/blog/working-with-amazon-route-53#comments</comments>
		<pubDate>Tue, 25 Jan 2011 19:52:51 +0000</pubDate>
		<dc:creator>Pauli Haikonen</dc:creator>
				<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[Ficora]]></category>
		<category><![CDATA[Route 53]]></category>

		<guid isPermaLink="false">http://www.dkaiser.com/blog/?p=183</guid>
		<description><![CDATA[TweetI wanted to get a fi-domain as I am building a site for our housing company. It&#8217;s very much a pro bono work, but interesting nevertheless. To be honest, this is the first time I have to register a fi-domain and man, it&#8217;s not as easy as getting a com or similar domain with DynDNS [...]]]></description>
			<content:encoded><![CDATA[<div class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Fworking-with-amazon-route-53&amp;text=Working%20with%20Amazon%20Route%2053&amp;related=&amp;lang=en&amp;count=&amp;counturl=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Fworking-with-amazon-route-53" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dkaiser.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>I wanted to get a fi-domain as I am building a site for our housing company. It&#8217;s very much a pro bono work, but interesting nevertheless. To be honest, this is the first time I have to register a fi-domain and man, it&#8217;s not as easy as getting a com or similar domain with DynDNS etc. You need to be a Finnish citizen to be allowed to get one for starters and made sure you are not violating any possible trademarks or even more, some real people with your domain name.</p>
<p>I would perhaps been ok if a DynDNS type of service would exists (well, now as I write this it probably does) in Finland, but the ones I came across were mostly just taking orders and not like dynamically updating their resources… but can&#8217;t of course be totally sure. Anyway, I decided to give Amazon Route 53 a go as it is new and I do appreciate the possibility to update the records on command line. Or well, I perhaps did not investigate really too much before signing up.</p>
<p>First I had to though register the fi-domain with Ficora and that took around a day to get the credentials on paper. Yes. On paper. The next step was to register the name and give them two (at this point fictious) name servers. Then I was on my way to Route 53. The first look at the Getting Started Guide is not very encouraging. Need to create some files which contain the access keys and the actual requests. Need to run a perl script to actually create the records. Good thing I bought my first Mac just a few months ago as with Windows this would have sucked.</p>
<p>So the first thing was to create the .aws-secret file which contains your AWS Secret Access Keys it looks something like this:</p>
<p>%awsSecretAccessKeys = (<br />
&#8220;my-keys&#8221; =&gt; {<br />
id =&gt; &#8220;JISEGIOJDFGSLSDKFG&#8221;,<br />
key =&gt; &#8220;KSLDFSDFGSDFGSasdfsdASFDSDF&#8221;,<br />
},<br />
);</p>
<p>And it really needs to be named .aws-secret and have only read permissions as the dnscurl.pl checks this.</p>
<p>Then create the zone you have registered:</p>
<p>&lt;CreateHostedZoneRequest xmlns=&#8221;https://route53.amazonaws.com/doc/2010-10-01/&#8221;&gt;<br />
&lt;Name&gt;YOURDOMAIN.fi.&lt;/Name&gt;<br />
&lt;CallerReference&gt;SOMETHINGRANDOMHERE&lt;/CallerReference&gt;<br />
&lt;HostedZoneConfig&gt;<br />
&lt;Comment&gt;Creating first zone&lt;/Comment&gt;<br />
&lt;/HostedZoneConfig&gt;<br />
&lt;/CreateHostedZoneRequest&gt;</p>
<p>Then download dnscurl.pl from the AWS developer tools and run it with these parameters:</p>
<p>dnscurl.pl &#8211;keyname my-keys &#8212; -X POST -H &#8220;Content-Type: text/xml; charset=UTF-8&#8243; &#8211;upload-file MyCreateRequest.xml https://route53.amazonaws.com/2010-10-01/hostedzone</p>
<p>You should get something like this in return:</p>
<p>&lt;CreateHostedZoneResponse xmlns=&#8221;https://route53.amazonaws.com/doc/2010-10-01/&#8221;&gt;&lt;HostedZone&gt;&lt;Id&gt;/hostedzone/34LJSKFSJGSDFKJ&lt;/Id&gt;&lt;Name&gt;YOURDOMAIN.fi.&lt;/Name&gt;&lt;CallerReference&gt;JIjasdmfasfw4af3233&lt;/CallerReference&gt;&lt;Config&gt;&lt;Comment&gt;Creating first zone&lt;/Comment&gt;&lt;/Config&gt;&lt;/HostedZone&gt;&lt;ChangeInfo&gt;&lt;Id&gt;/change/23ILKSFJDLSK&lt;/Id&gt;&lt;Status&gt;PENDING&lt;/Status&gt;&lt;SubmittedAt&gt;2011-01-24T20:48:47.715Z&lt;/SubmittedAt&gt;&lt;/ChangeInfo&gt;&lt;DelegationSet&gt;&lt;NameServers&gt;&lt;NameServer&gt;ns-1778.awsdns-30.co.uk&lt;/NameServer&gt;&lt;NameServer&gt;ns-372.awsdns-44.com&lt;/NameServer&gt;&lt;NameServer&gt;ns-1621.awsdns-38.org&lt;/NameServer&gt;&lt;NameServer&gt;ns-534.awsdns-04.net&lt;/NameServer&gt;&lt;/NameServers&gt;&lt;/DelegationSet&gt;&lt;/CreateHostedZoneResponse&gt;</p>
<p>Here are the real name servers which I had to give to Ficora and it happily said them being ok, so fi-domain is well supported by AWS! Yey!</p>
<p>Then you can start adding records to your zone. First need to create the MyRecordsRequest.xml for the records which could look like this:</p>
<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<br />
&lt;ChangeResourceRecordSetsRequest xmlns=&#8221;https://route53.amazonaws.com/doc/2010-10-01/&#8221;&gt;<br />
&lt;ChangeBatch&gt;<br />
&lt;Comment&gt;<br />
Create A-record<br />
&lt;/Comment&gt;<br />
&lt;Changes&gt;<br />
&lt;Change&gt;<br />
&lt;Action&gt;CREATE&lt;/Action&gt;<br />
&lt;ResourceRecordSet&gt;<br />
&lt;Name&gt;www.yourdomain.fi.&lt;/Name&gt;<br />
&lt;Type&gt;A&lt;/Type&gt;<br />
&lt;TTL&gt;14400&lt;/TTL&gt;<br />
&lt;ResourceRecords&gt;<br />
&lt;ResourceRecord&gt;<br />
&lt;Value&gt;192.0.0.111&lt;/Value&gt;<br />
&lt;/ResourceRecord&gt;<br />
&lt;/ResourceRecords&gt;<br />
&lt;/ResourceRecordSet&gt;<br />
&lt;/Change&gt;<br />
&lt;/Changes&gt;<br />
&lt;/ChangeBatch&gt;<br />
&lt;/ChangeResourceRecordSetsRequest&gt;</p>
<p>dnscurl.pl &#8211;keyname my-keys &#8212; -H &#8220;Content-Type: text/xml; charset=UTF-8&#8243; -X POST &#8211;upload-file ./MyRecordsRequest.xml https://route53.amazonaws.com/2010-10-01/hostedzone/34LJSKFSJGSDFKJ/rrset</p>
<p>And you should get a response like this:<br />
0.0%<br />
&lt;?xml version=&#8221;1.0&#8243;?&gt;<br />
&lt;ChangeResourceRecordSetsResponse xmlns=&#8221;https://route53.amazonaws.com/doc/2010-10-01/&#8221;&gt;&lt;ChangeInfo&gt;&lt;Id&gt;/change/C3FMNWCVL1YW40&lt;/Id&gt;&lt;Status&gt;PENDING&lt;/Status&gt;&lt;SubmittedAt&gt;2011-01-25T19:16:24.181Z&lt;/SubmittedAt&gt;&lt;/ChangeInfo&gt;&lt;/ChangeResourceRecordSetsResponse&gt;</p>
<p>I got a few problems with &#8220;root is not authorized to perform: route53:ChangeResourceRecordSets on resource&#8221; because I did not have ./ in front of the MyRecordsRequest.xml, so remember to have it there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dkaiser.com/blog/working-with-amazon-route-53/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Outbound mail from AWS</title>
		<link>http://www.dkaiser.com/blog/outbound-mail-from-aws?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=outbound-mail-from-aws</link>
		<comments>http://www.dkaiser.com/blog/outbound-mail-from-aws#comments</comments>
		<pubDate>Wed, 05 Jan 2011 17:52:32 +0000</pubDate>
		<dc:creator>Pauli Haikonen</dc:creator>
				<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[authsmtp]]></category>
		<category><![CDATA[email]]></category>

		<guid isPermaLink="false">http://www.dkaiser.com/blog/?p=173</guid>
		<description><![CDATA[TweetHello! I wrote a while back about my new architecture for the vKaiser.com site. I have been relatively happy with the setup until I realized one thing about the system. If I have three frontend servers with Drupal installed in all of them, all of them should be capable of sending email. I had only [...]]]></description>
			<content:encoded><![CDATA[<div class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Foutbound-mail-from-aws&amp;text=Outbound%20mail%20from%20AWS&amp;related=&amp;lang=en&amp;count=&amp;counturl=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Foutbound-mail-from-aws" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dkaiser.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>Hello!</p>
<p>I wrote a while back about my new architecture for the <a href="http://vkaiser.com">vKaiser.com</a> site. I have been relatively happy with the setup until I realized one thing about the system. If I have three frontend servers with Drupal installed in all of them, all of them should be capable of sending email. I had only configured the first one which I have been happy with as it powers the dkaiser.com mail traffic  (which is not much to be honest) as well.</p>
<p>So I now had to try to remember what I had done about a year ago with Postfix to get it running the first place. I used a rather old image to build the two other servers which did not even have it installed, only FFMPEG which by the way works pretty well in this kind of distributed system. I had done something with the /etc/postfix/main.cf as I had configured <a href="http://www.authsmtp.com">AuthSMTP</a> to work as the relay agent. I found some decent instructions from <a href="http://www.mugginsoft.com/content/configuring-outgoing-mail-drupal-postfix">here</a> which I pretty much followed, while also copying the main.cf from the working server. Those instructions are really spot on, except I had to do postmap /etc/postfix/canonical to actually build the canonical.db, but after that mail started working. By default the sender is apache@example.com which if you haven&#8217;t allowed in AuthSMTP won&#8217;t get too far.</p>
<p>Now all is good!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dkaiser.com/blog/outbound-mail-from-aws/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free Monitoring!</title>
		<link>http://www.dkaiser.com/blog/free-monitoring?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=free-monitoring</link>
		<comments>http://www.dkaiser.com/blog/free-monitoring#comments</comments>
		<pubDate>Sat, 04 Dec 2010 20:58:54 +0000</pubDate>
		<dc:creator>Pauli Haikonen</dc:creator>
				<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[CloudWatch]]></category>

		<guid isPermaLink="false">http://www.dkaiser.com/blog/?p=171</guid>
		<description><![CDATA[TweetAmazon announced free monitoring for EC2 instances. A cool new feature, I have to say. It looks good too. Just check your instances and the monitoring tab. As I had already discussed about those load tests with the t1.micro instances, I have to say it sucks a bit for not having this kind of monitoring [...]]]></description>
			<content:encoded><![CDATA[<div class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Ffree-monitoring&amp;text=Free%20Monitoring%21&amp;related=&amp;lang=en&amp;count=&amp;counturl=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Ffree-monitoring" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dkaiser.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>Amazon <a href="http://aws.amazon.com/about-aws/whats-new/2010/12/03/announcing-free-monitoring-for-amazon-ec2-instances/">announced</a> free monitoring for EC2 instances. A cool new feature, I have to say. It looks good too. Just check your instances and the monitoring tab. As I had already discussed about those load tests with the t1.micro instances, I have to say it sucks a bit for not having this kind of monitoring available when I was doing it&#8230; but maybe I will test again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dkaiser.com/blog/free-monitoring/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Load Balancing with HAproxy</title>
		<link>http://www.dkaiser.com/blog/load-balancing-with-haproxy?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=load-balancing-with-haproxy</link>
		<comments>http://www.dkaiser.com/blog/load-balancing-with-haproxy#comments</comments>
		<pubDate>Sat, 30 Oct 2010 06:03:53 +0000</pubDate>
		<dc:creator>Pauli Haikonen</dc:creator>
				<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[haproxy]]></category>
		<category><![CDATA[load balancing]]></category>
		<category><![CDATA[t1.micro]]></category>
		<category><![CDATA[vkaiser.com]]></category>

		<guid isPermaLink="false">http://www.dkaiser.com/blog/?p=167</guid>
		<description><![CDATA[TweetI&#8217;ve been talking about load balancing already a bit, but that was about the Amazon Elastic Load Balancing. It&#8217;s a super easy way to do load balancing, with management now also through the EC2 management console, I believe. Then again, you have to use a CNAME to point to the load balancer which is a [...]]]></description>
			<content:encoded><![CDATA[<div class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Fload-balancing-with-haproxy&amp;text=Load%20Balancing%20with%20HAproxy&amp;related=&amp;lang=en&amp;count=&amp;counturl=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Fload-balancing-with-haproxy" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dkaiser.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>I&#8217;ve been talking about load balancing <a href="http://www.dkaiser.com/blog/amazon-aws-elastic-load-balancing">already</a> a bit, but that was about the Amazon Elastic Load Balancing. It&#8217;s a super easy way to do load balancing, with management now also through the EC2 management console, I believe. Then again, you have to use a CNAME to point to the load balancer which is a restriction as most of the cool guys have their site as http://mysite.com and this is why I did a HAproxy installation too.</p>
<p>So I have this <a href="http://vkaiser.com">http://vkaiser.com</a> site which is a social site with video upload capabilites and connections to <a href="http://twitter.com">Twitter</a> and <a href="http://www.facebook.com">Facebook</a> but mostly it&#8217;s just my hobby and a test site on how to run Drupal. It&#8217;s a basic LAMP installation with EBS based image with the thumbnails and videos in S3 bucket. I&#8217;ve been wanting to add a load balancer, multiple web servers and a separate database server for a long time, but now as the t1.micro instances have become available, I have the financial possibilities to add them. </p>
<p>I first started with the load balancer. There are multiple good tutorials out there on how to do this, such as <a href="http://www.howtoforge.com/high-availability-load-balancer-haproxy-heartbeat-fedora8">this</a>. That tutorial even has instructions on how to install a high availability load balancing with heartbeat. I did not do that as I could not figure out how assign the virtual ip which the load balancers should share. One other thing which did not seem to work, was the web farm listening ip. For some reason it did not work with the elastic ip I had given for the HAproxy. I had to use a wild card to get connection to web servers working through the HAproxy. It might have something to do with virtual hosts, but I have not tested that.</p>
<p>It might be good to mention, that the connections after the HAproxy are done through the private address space as this does not consume the bandwidth. It might be interesting to see how the system can work with multiple availability zones, given there is a way a round the virtual ip problem. Well, one thing which might work is to have a hot stand-by HAproxy which would check the running HAproxy for availability and then start doing tricks with the AWS api if the other zone would not be available.</p>
<p>Then the file uploads. As it is a video site with the possibility to upload videos, I need to have some way to get the same uploaded files to all of the web servers. A scalable way would have been to install yet two more file servers with high availability, but at this stage I did not do that. I only did rsync with public key authentication between the servers. A good tutorial on how to do the public key stuff can be found <a href="http://blogs.sun.com/jkini/entry/how_to_scp_scp_and">here</a>. </p>
<p>I actually have three web servers, which one of them is the database server because I did not add the wordpress installation (this blog) to the web farm yet at least. Thus, the vkaiser web farm has three nodes where the db server is kind of the root. All theme updates are done there and synced forward to the other two nodes. File uploads are synced from the other nodes to the root and from the root to the other two nodes. The slave nodes don&#8217;t sync directly between each other because there is no real need as they hop through the db server. In case the db server would be down, the site is gone anyway.</p>
<p>Oh yeah, one thing was the video conversion to flash. I have ffmpeg on the web servers, which is bad bad bad, but now as there are three nodes it should be a slightly better situation.</p>
<p>Next up would then be the master-slave replication for the database, investigating if there is a way to do that HAproxy virtual ip or elastic ip reassignment, move to a file share instead of rsync and get Puppet to take care of the configuration management. Possibly a separate cluster for ffmpeg would be so cool as well. A lot more to do! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dkaiser.com/blog/load-balancing-with-haproxy/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing t1.micro with loadimpact.com</title>
		<link>http://www.dkaiser.com/blog/testing-t1-micro-with-loadimpact-com?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=testing-t1-micro-with-loadimpact-com</link>
		<comments>http://www.dkaiser.com/blog/testing-t1-micro-with-loadimpact-com#comments</comments>
		<pubDate>Thu, 07 Oct 2010 20:06:09 +0000</pubDate>
		<dc:creator>Pauli Haikonen</dc:creator>
				<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[loadimpact.com]]></category>
		<category><![CDATA[t1.micro]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[vkaiser.com]]></category>

		<guid isPermaLink="false">http://www.dkaiser.com/blog/?p=158</guid>
		<description><![CDATA[TweetWell hello there! It’s been a while, but I finally found some time to work with the sites and the latest of Amazon Web Services. Lately, AWS has introduced the tiny micro instances with a tempting price tag for small businesses with not too much of a need for high performance. For me, those do [...]]]></description>
			<content:encoded><![CDATA[<div class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Ftesting-t1-micro-with-loadimpact-com&amp;text=Testing%20t1.micro%20with%20loadimpact.com&amp;related=&amp;lang=en&amp;count=&amp;counturl=http%3A%2F%2Fwww.dkaiser.com%2Fblog%2Ftesting-t1-micro-with-loadimpact-com" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dkaiser.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>Well hello there! It’s been a while, but I finally found some time to work with the sites and the latest of Amazon Web Services. Lately, AWS has introduced the tiny micro instances with a tempting price tag for small businesses with not too much of a need for high performance. For me, those do sound fantastic for testing purposes as I have been wanting to try running the two sites, this and <a href="http://www.vkaiser.com">vkaiser.com</a> on a bit more robust architecture than the current one with just an EBS based AMI and the videos in S3. </p>
<p>I run the typical LAMP stack on one AMI, thus the idea was first to boot up one micro instance and have a look. Well, I chose to go with some old image I had created way long time ago. It also had a LAMP stack installed, but of course it was kind of outdated and the vkaiser.com did not look too good (well, does it now either…), so I figured I could rsync the html folder of the Drupal installation and I did eventually get the rsync with public key working. Then I realized that the db wasn’t really up to date either and the drupal modules would not of course work, so how about connecting to the database on the current “production” which would kind of resemble the hopefully future setup too as running a separate db server (and slave) would just be the way to go at least with Drupal.</p>
<p>Settings in Drupal for remote database connections are really simple. First edit the MySQL configuration (/etc/my.cnf) to have </p>
<p>Bind-address=database_ip</p>
<p>And if you have skip networking defined, comment that out.</p>
<p>Then add remote access permissions to the database for a db user </p>
<p>GRANT ALL ON *.* TO &#8216;dbuser&#8217;@'remote_ip&#8217; IDENTIFIED BY &#8216;password&#8217;;</p>
<p>And modify the settings.php on the remote application server to point to the database server:</p>
<p>$db_url = &#8216;mysql://dbuser:password@database_ip/database_name&#8217;;</p>
<p>Then you can test the connection to the database. At least I got that working, though I was first editing the wrong settings.php file which of course did not prove to be very useful in getting the db connection working.</p>
<p>The real deal was though to see how the t1.micro performs under stress. I browsed a while for some tools with how to do the test, but then I found loadimpact.com which simulates really well concurrent users from 0-50 for free! With some euros, you can get up to 5000 users and customized tests and what not. I like the service, though it went down just as I got my t1.micro <a href="http://loadimpact.com/result/micro.vkaiser.com338474d1a1903200b144e041909d4f84">tested</a>. The average response time was around 1.5 seconds for the vkaiser.com frontpage and it did not show any real implications of getting slower, thus I should put more load on the micro if I coughed up some cash. I next went on and tested my good old small instance and got about the same <a href="http://loadimpact.com/result/www.vkaiser.com-65b4295ea1e654ada6d731fc69b43a56">results</a></p>
<p>This wasn’t too scientific, though the results are encouraging. I mean, 50 concurrent users is about 49 more than this site usually has and the micro worked well, so I am planning to make a switch soon… More about that later!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dkaiser.com/blog/testing-t1-micro-with-loadimpact-com/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

