{"id":1534,"date":"2016-02-25T14:40:17","date_gmt":"2016-02-25T14:40:17","guid":{"rendered":"http:\/\/www.tekhead.org\/blog\/?p=1534"},"modified":"2016-10-09T16:40:40","modified_gmt":"2016-10-09T15:40:40","slug":"amazon-aws-tips-and-gotchas-part-1","status":"publish","type":"post","link":"https:\/\/tekhead.it\/blog\/2016\/02\/amazon-aws-tips-and-gotchas-part-1\/","title":{"rendered":"Amazon AWS Tips and Gotchas &#8211; Part 1 &#8211; AWS Intro, EBS and EC2"},"content":{"rendered":"<p class=\"p1\"><span class=\"s1\">Although I have been very much aware of AWS for many years and understood it at a high level, I have never had the time to get deep down and dirty with the AWS platform\u2026 that is until now!<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">I have spent the past three weeks immersing myself in AWS via the most excellent <a href=\"https:\/\/acloud.guru\/course\/aws-certified-solutions-architect-associate\/\" target=\"_blank\">ACloud.Guru Solution Architect Associate training course<\/a>, followed by a one week intensive AWS instructor-led class from <a href=\"https:\/\/www.qa.com\/training-courses\/technical-it-training\/amazon\/aws-accelerated-architecting-associate-and-professional\" target=\"_blank\">QA on AWS SA Associate and Professional<\/a>.<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">While the 100 hours or so I have spent labbing and interacting with AWS is certainly not <a href=\"http:\/\/www.bbc.co.uk\/news\/magazine-26384712\" target=\"_blank\">10,000<\/a>, it has given me some valuable insights on both how absolutely <i>AWS<\/i>ome (sorry &#8211; had to be done!) the platform is, as well as experiencing a few eye openers which I felt were worth sharing.<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">It would be very easy for me to extoll the virtues of AWS, but I don&#8217;t think there would be much benefit to that. Everyone knows it is a great platform (but maybe I&#8217;ll do it later anyway)! In the meantime, I thought it would be worthwhile taking a bit more of a &#8220;warts and all&#8221; view of a few features. Hopefully, this will avoid others stepping into the potential traps which have\u00a0come up directly or indirectly through\u00a0my recent training materials, as well as being a memory aid to\u00a0myself!<\/span><\/p>\n<p class=\"p1\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1594\" src=\"http:\/\/www.tekhead.org\/wp-uploads\/www.tekhead.org\/2016\/02\/prettycloud.jpg\" alt=\"pretty cloud AWS EC2 EBS\" width=\"165\" height=\"248\" srcset=\"https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/prettycloud.jpg 500w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/prettycloud-100x150.jpg 100w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/prettycloud-200x300.jpg 200w\" sizes=\"auto, (max-width: 165px) 100vw, 165px\" \/><\/p>\n<p class=\"p1\"><span class=\"s1\">The key thing is with all of these &#8220;gotchas&#8221;, they are not irreparable, and can generally be worked around by tweaking your infrastructure design. In addition,\u00a0with the rate that AWS develop and update features on their platforms, it is likely that many of them will improve over the coming months \/ years anyway.<\/span><\/p>\n<p class=\"p1\">The general feeling around many of these &#8220;features&#8221; is that AWS are indirectly and gently encouraging you to avoid building your solutions on EC2 and other IaaS services, Instead, pushing you more towards using their more managed services such as RDS, Lambda, Elastic Beanstalk etc.<\/p>\n<p class=\"p1\"><span class=\"s1\">This did originally start off as a single &#8220;Top 10&#8221; post but realised quickly that there are a lot more than 10 items and some of them are pretty deep dive! As such, I have split the content into easily consumable chunks, with a few lightweight ones to get us started&#8230; keep your eyes open for a few whoppers later in the series!<br \/>\n<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">The full list of posts will be available here:<br \/>\n<\/span><span class=\"s3\"><a href=\"http:\/\/tekhead.it\/blog\/2016\/07\/index-of-tekhead-it-blog-posts-on-amazon-aws\/#gotchas\" target=\"_blank\">Index of AWS Tips and Gotchas<\/a><\/span><\/p>\n<h5 class=\"p1\"><span class=\"s1\"><b>AWS Tips and Gotchas &#8211; Part 1<\/b><\/span><\/h5>\n<ol class=\"ol1\">\n<li class=\"li1\"><span class=\"s1\"><span class=\"s1\"><span class=\"s1\"><em>Storage for any single instance\u00a0may not exceed 20,000 IOPS and 320MB\/sec per EBS volume.<\/em> This is really only something which will impact very significant workloads. The current &#8220;recommended&#8221; workaround for this is to do some pretty scary things such as in-guest RAID \/ striping!<br \/>\n<\/span><\/span><\/span><span class=\"s1\"><span class=\"s1\"><br \/>\nDoing this with RAID0 means you then immediately risk loss of the entire datastore if a single EBS volume in the set goes offline for even a few seconds. Alternatively, you can buy twice as much storage and waste compute resources doing RAID calculations. In addition, you then have to do some really kludgy things to get consistent snapshots from your volume, such as taking your service offline.\u00a0<\/span><\/span>In reality, only the most extreme workloads hit this kind of scale up. The real answer (which is probably better in the long term) is to refactor your application or database for scale-out, a far more cloudy design.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1553\" src=\"http:\/\/www.tekhead.org\/wp-uploads\/www.tekhead.org\/2016\/02\/amazon-ebs.jpg\" alt=\"amazon AWS EBS\" width=\"80\" height=\"93\" \/><\/li>\n<li class=\"li1\"><span class=\"s1\"><span class=\"s1\"><span class=\"s1\"><em>The internet gateway service does not provide a native method for capping of outbound bandwidth.<\/em> It doesn&#8217;t take a genius to work out that when outbound bandwidth is chargeable, you could walk away with a pretty significant bandwidth bill should something decide to attack your platform with a high volume of traffic.\u00a0<\/span><\/span><\/span>One potential method to work around this would be to use NAT instances. You can then control the bandwidth using 3rd party software in the NAT instance OS.<\/li>\n<li class=\"li1\"><span class=\"s1\"><span class=\"s1\"><span class=\"s1\"><em>There is no SLA for EC2 instances unless you run them across <a href=\"https:\/\/aws.amazon.com\/ec2\/sla\/\" target=\"_blank\">multiple Availability Zones<\/a><\/em>. Of course with typical RTTs of a few milliseconds at most, there is very little reason not to stretch your solutions across multiple AZs. The only time you might keep in one AZ is if you have highly latency sensitive applications, or potentially the type of app which requires a serialised string of DB queries to generate a response to the end user.<br \/>\n<\/span><\/span><\/span><span class=\"s1\"><span class=\"s1\"><span class=\"s1\"><br \/>\nIn a way I actually quite like this SLA requirement as it pushes customers who might otherwise have accepted the risk of a single DC, into designing something more robust and accepting the (often minor) additional costs.\u00a0With the use of Auto Scaling and Elastic Load Balancing there is often no reason you can&#8217;t have a very highly available application split across two or more AZs, whilst using roughly the same number of servers as a\u00a0single site solution.<br \/>\n<\/span><\/span><\/span><br \/>\nFor example the following solution would be resilient to a single AZ failure, whilst using\u00a0no more infrastructure than a typical resilient on-premises single site solution:<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1544\" src=\"http:\/\/www.tekhead.org\/wp-uploads\/www.tekhead.org\/2016\/02\/Tekhead-Simple-HA-Web-Configuration.png\" alt=\"Teahead AWS Simple HA Web Configuration\" width=\"450\" height=\"435\" srcset=\"https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/Tekhead-Simple-HA-Web-Configuration.png 592w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/Tekhead-Simple-HA-Web-Configuration-150x145.png 150w, https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/Tekhead-Simple-HA-Web-Configuration-300x290.png 300w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><br \/>\n<span class=\"s1\">No DR replication required, no crazy metro clustering setup, nothing; just a cost effective, scalable, highly resilient and simple setup capable of withstanding the loss of an entire data centre (though not a region, obviously).<\/span><\/li>\n<\/ol>\n<p>Find\u00a0more posts in this series here:<br \/>\n<a href=\"http:\/\/tekhead.it\/blog\/2016\/07\/index-of-tekhead-it-blog-posts-on-amazon-aws\/#gotchas\" target=\"_blank\">Index of AWS Tips and Gotchas<\/a><\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"9LoJDeLLr7\"><p><a href=\"http:\/\/tekhead.it\/blog\/2016\/02\/amazon-aws-tips-and-gotchas-part-2\/\">Amazon AWS Tips and Gotchas &#8211; Part 2 &#8211; AWS EBS &#038; RDS MS SQL<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Amazon AWS Tips and Gotchas &#8211; Part 2 &#8211; AWS EBS &#038; RDS MS SQL&#8221; &#8212; Tekhead.it\" src=\"http:\/\/tekhead.it\/blog\/2016\/02\/amazon-aws-tips-and-gotchas-part-2\/embed\/#?secret=KrGkiAmGYB#?secret=9LoJDeLLr7\" data-secret=\"9LoJDeLLr7\" width=\"590\" height=\"332\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Although I have been very much aware of AWS for many years and understood it at a high level, I have never had the time to get deep [..]<\/p>\n","protected":false},"author":1,"featured_media":1549,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"AWS","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"AWS is awesome, but this series describes common issues you may come across and provides tips, workarounds & fixes. Part 1 covers AWS EBS and EC2.","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"New Blog Post: #Amazon #AWS Tips and Gotchas - Part 1 | #Cloud","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[688,725,449],"tags":[270,709,711,699,706,707,223,705,701,702,57,704,703,712,700,145,710,189,66,56],"class_list":["post-1534","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws","category-cloud","category-storage","tag-amazon","tag-architecture","tag-associate","tag-aws","tag-awsgotchas","tag-awstips","tag-cloud","tag-dr","tag-ebs","tag-ec2","tag-education","tag-high-availability","tag-igw","tag-professional","tag-qa","tag-raid","tag-solution-architect","tag-storage","tag-tips","tag-training"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/tekhead.it\/wp-uploads\/www.tekhead.org\/2016\/02\/amazon-web-services-logo.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2l3lU-oK","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/posts\/1534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/comments?post=1534"}],"version-history":[{"count":38,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/posts\/1534\/revisions"}],"predecessor-version":[{"id":1951,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/posts\/1534\/revisions\/1951"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/media\/1549"}],"wp:attachment":[{"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/media?parent=1534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/categories?post=1534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tekhead.it\/blog\/wp-json\/wp\/v2\/tags?post=1534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}