{"id":777,"date":"2010-01-13T01:07:22","date_gmt":"2010-01-12T17:07:22","guid":{"rendered":"http:\/\/www.tzlee.com\/blog\/?p=777"},"modified":"2010-01-13T16:31:59","modified_gmt":"2010-01-13T08:31:59","slug":"amazon-ec2","status":"publish","type":"post","link":"https:\/\/tzlee.com\/blog\/2010\/01\/amazon-ec2\/","title":{"rendered":"First Peek at Amazon EC2"},"content":{"rendered":"<p>I just got my Amazon EC2 account today and poked around a bit. Technically, it&#8217;s just a super cluster of virtualized servers running a (very likely) hacked copy of the open source <a href=\"http:\/\/www.xen.org\/\">Xen<\/a> with a AJAX-enabled web management interface. The servers are undoubtedly Intel Xeons.<\/p>\n<blockquote><p><code>[root@domU-12-31-39-09-2E-31 ~]# uname -a<br \/>\nLinux domU-12-31-39-09-2E-31 2.6.18-xenU-ec2-v1.2 #2 SMP Wed Aug 19 09:04:38 EDT 2009 i686 i686 i386 GNU\/Linux<br \/>\n[root@domU-12-31-39-09-2E-31 ~]# cat \/proc\/cpuinfo<br \/>\nprocessor\u00a0\u00a0 \u00a0: 0<br \/>\nvendor_id\u00a0\u00a0 \u00a0: GenuineIntel<br \/>\ncpu family\u00a0\u00a0 \u00a0: 6<br \/>\nmodel\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0: 23<br \/>\nmodel name\u00a0\u00a0 \u00a0: Intel(R) Xeon(R) CPU\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 E5430\u00a0 @ 2.66GHz<br \/>\nstepping\u00a0\u00a0 \u00a0: 10<br \/>\ncpu MHz\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0: 2666.760<br \/>\ncache size\u00a0\u00a0 \u00a0: 6144 KB<br \/>\nfdiv_bug\u00a0\u00a0 \u00a0: no<br \/>\nhlt_bug\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0: no<br \/>\nf00f_bug\u00a0\u00a0 \u00a0: no<br \/>\ncoma_bug\u00a0\u00a0 \u00a0: no<br \/>\nfpu\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0: yes<br \/>\nfpu_exception\u00a0\u00a0 \u00a0: yes<br \/>\ncpuid level\u00a0\u00a0 \u00a0: 13<br \/>\nwp\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0: yes<br \/>\nflags\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0: fpu tsc msr pae mce cx8 apic mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc up pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm<br \/>\nbogomips\u00a0\u00a0 \u00a0: 5335.77<\/code><\/p><\/blockquote>\n<p>There&#8217;s nothing technically amazing here but it&#8217;s interesting how Amazon put it together into a pay-per-use revenue model. It seems like they got the billing portion right.<\/p>\n<p>Personally, I don&#8217;t quite like the management of it though. If you&#8217;ve used VMware ESX or Citrix XenServer you might agree with me.<\/p>\n<p>For example, I couldn&#8217;t alter my firewall configuration once my instance was deployed. I created <a href=\"http:\/\/75.101.163.152\/\">my first instance<\/a> with a default firewall rule that drops everything, so in desperation I created another one.<\/p>\n<p>Then I realized I couldn&#8217;t delete an instance either. It took me a while to figure out that there is actually a <a href=\"http:\/\/developer.amazonwebservices.com\/connect\/entry.jspa?externalID=351\">command line client tool<\/a> written in Java that allows me to delete an instance. In fact, the client tool has way more capabilities than the funky AJAX web interface.<\/p>\n<p>Here&#8217;s the <a href=\"http:\/\/docs.amazonwebservices.com\/AWSEC2\/2009-11-30\/GettingStartedGuide\/\">Getting Started Guide<\/a>. You need to read this to learn how to set up the authentication mechanisms. I presume most of us here can set up the Java environment variables no problem.<\/p>\n<p>Here&#8217;s the EC2 <a href=\"http:\/\/docs.amazonwebservices.com\/AWSEC2\/latest\/CommandLineReference\/\">Command Line Tools Reference<\/a>.<\/p>\n<p>It took me quite a while to find these links so do bookmark them.<\/p>\n<p style=\"text-align: center;\">***<\/p>\n<p>Just a quick start for everyone here since the authentication part is a hassle. The documentation had a bunch of talk cock before they got to the point.<\/p>\n<ol>\n<li> You&#8217;ll need to login to AWS, then go under the <strong>Your Account &gt; Security Credentials<\/strong> menu on the top right hand corner.<\/li>\n<li>Scroll down and look under the <strong>Access Credentials<\/strong> heading.<\/li>\n<li>Click the <strong>X.509 Certificates<\/strong> tab.<\/li>\n<li>Click <strong>Create a new Ceritificate<\/strong>.<\/li>\n<li>Download both the <strong>Private Key File<\/strong> and <strong>Certificate File<\/strong>.<\/li>\n<li>Get down to your command prompt.<\/li>\n<li>Change to the directory where you unzipped the EC2 API tools.<\/li>\n<li>Make sure <em>JAVA_HOME<\/em> and <em>PATH<\/em> are both set.<\/li>\n<li>Set <em>EC2_HOME<\/em> to the directory in step 7 above.<\/li>\n<li>Change to the <em>bin<\/em> directory within the EC2 API tools directory.<\/li>\n<\/ol>\n<p>You&#8217;re all ready to go run the <em>.cmd<\/em> files (for Windows) or the non <em>.cmd<\/em> files (for MacOS\/Linux guys).<\/p>\n<p style=\"text-align: center;\">***<\/p>\n<p><em>Update:<\/em> Here&#8217;s a freebie for the MacOS X users &#8211; paste these into <code>~\/.bash_profile<\/code> so you don&#8217;t have to specify your key and cert all the time. (Edit where necessary.)<\/p>\n<blockquote><p><code>export JAVA_HOME=\/Library\/Java\/Home<br \/>\nexport EC2_HOME=~\/Downloads\/ec2-api-tools-1.3-46266<br \/>\nexport EC2_PRIVATE_KEY=~\/Downloads\/pk-XXXX.pem<br \/>\nexport EC2_CERT=~\/Downloads\/cert-XXXX.pem<br \/>\nexport PATH=$PATH:$EC2_HOME\/bin<\/code><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>I just got my Amazon EC2 account today and poked around a bit. Technically, it&#8217;s just a super cluster of virtualized servers running a (very likely) hacked copy of the open source Xen with a AJAX-enabled web management interface. The&#8230; <a class=\"more-link\" href=\"https:\/\/tzlee.com\/blog\/2010\/01\/amazon-ec2\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[8],"tags":[146,147],"class_list":["post-777","post","type-post","status-publish","format-standard","hentry","category-tech","tag-amazon","tag-ec2"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tzlee.com\/blog\/wp-json\/wp\/v2\/posts\/777","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tzlee.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tzlee.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tzlee.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tzlee.com\/blog\/wp-json\/wp\/v2\/comments?post=777"}],"version-history":[{"count":13,"href":"https:\/\/tzlee.com\/blog\/wp-json\/wp\/v2\/posts\/777\/revisions"}],"predecessor-version":[{"id":790,"href":"https:\/\/tzlee.com\/blog\/wp-json\/wp\/v2\/posts\/777\/revisions\/790"}],"wp:attachment":[{"href":"https:\/\/tzlee.com\/blog\/wp-json\/wp\/v2\/media?parent=777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tzlee.com\/blog\/wp-json\/wp\/v2\/categories?post=777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tzlee.com\/blog\/wp-json\/wp\/v2\/tags?post=777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}