{"id":629,"date":"2012-10-15T13:30:25","date_gmt":"2012-10-15T13:30:25","guid":{"rendered":"https:\/\/wade.one\/blog\/?p=629"},"modified":"2016-04-11T18:23:44","modified_gmt":"2016-04-11T18:23:44","slug":"using-amazon-ec2-with-c-net","status":"publish","type":"post","link":"https:\/\/wade.one\/blog\/2012\/10\/15\/using-amazon-ec2-with-c-net\/","title":{"rendered":"Using Amazon EC2 with C# .net"},"content":{"rendered":"<p>Amazon&#8217;s EC2 platform has a very in-depth console which allows you to do a lot, but what if you want to automate some of the processes or handling servers? I&#8217;ve been working with EC2 a lot recently and automating server starting\/stopping based on parameters of the system we use here at <a href=\"http:\/\/www.mediaskunkworks.com\/\" target=\"_blank\">MediaSkunkworks<\/a> and thought I&#8217;d share some knowledge.<\/p>\n<h3><span style=\"text-decoration: underline;\">Getting Started<\/span><\/h3>\n<p>You&#8217;ll want to grab yourself the AWSSDK; this can be from the installer at <a href=\"http:\/\/aws.amazon.com\/sdkfornet\/\" target=\"_blank\">http:\/\/aws.amazon.com\/sdkfornet\/<\/a> or as a NuGet package in your VS project. If you use the installer, be sure to add a reference to the AWSSDK.dll file (should be at C:\\Program Files (x86)\\AWS SDK for .NET\\bin\\AWSSDK.dll) on a 64-bit OS.<\/p>\n<h3><span style=\"text-decoration: underline;\">Set-up<\/span><\/h3>\n<p>In the Amazon namespace there is a class called <strong>AWSClientFactory<\/strong> which is a factory class (kind of obvious I suppose!) used to create &#8220;clients&#8221; for the various services Amazon offers. In this case we&#8217;ll be using the method <strong>CreateAmazonEC2Client<\/strong>. You will need your access key and secret access key to call this function, they can be found on the <a title=\"https:\/\/portal.aws.amazon.com\/gp\/aws\/securityCredentials\" href=\"https:\/\/portal.aws.amazon.com\/gp\/aws\/securityCredentials\" target=\"_blank\">security credentials<\/a> page in your account &#8211; if you&#8217;ve not created them yet, they can be created here too.<\/p>\n<p>To get an instance of the client, the method is called as follows:<\/p>\n<pre><span style=\"color: #00ccff;\">AmazonEC2 <\/span>client = <span style=\"color: #00ccff;\">AWSClientFactory<\/span>.CreateAmazonEC2Client(\r\n        <span style=\"color: #800000;\">\"YOUR_ACCESS_KEY\"<\/span>,\r\n        <span style=\"color: #800000;\">\"YOUR_SECRET_ACCESS_KEY<\/span>\",\r\n        <span style=\"color: #0000ff;\">new<\/span> <span style=\"color: #00ccff;\">AmazonEC2Config<\/span>()\r\n        {\r\n                ServiceURL = <span style=\"color: #800000;\">\"<\/span><span style=\"color: #3366ff;\">https:\/\/eu-west-1.ec2.amazonaws.com\/<\/span><span style=\"color: #800000;\">\"<\/span>,\r\n                UseSecureStringForAwsSecretKey = <span style=\"color: #0000ff;\">false<\/span>\r\n        }\r\n);<\/pre>\n<p>You&#8217;ll notice I&#8217;ve passed in an instance of <strong>AmazonEC2Config<\/strong>, with a <strong>ServiceURL<\/strong>. This makes future calls using this client easier if you&#8217;re working on one &#8220;zone&#8221; in Amazon &#8211; also note for Europe it&#8217;s just eu-west-1, no a, b or c at the end &#8211; this applies to all zones. As for the <strong>UseSecureStringForAwsSecretKey<\/strong>, this is due to .NET restrictions in trust levels, ideally this should be true but for a non distributed app (i.e. one you run on a private server no one can access) this is fine.<\/p>\n<p>The <em>clien<\/em><em>t<\/em> variable will now have an instance of the AmazonEC2 object which has a whole host of helper methods for various things you can do with the EC2 platform. (The complete list of methods in this class can be seen at the <a title=\"API Docs for AWSSDK\" href=\"http:\/\/docs.amazonwebservices.com\/sdkfornet\/latest\/apidocs\/html\/T_Amazon_EC2_AmazonEC2.htm\">API reference<\/a>.)<\/p>\n<h3><span style=\"text-decoration: underline;\">Retrieving a List of Running Instances<\/span><\/h3>\n<p>The method you&#8217;ll need here is <strong>DescribeInstances<\/strong> which requires an instance of <strong>DescribeInstancesRequest<\/strong> (the AWSSDK is <em>extremely<\/em> OO heavy as you&#8217;ll see below!). There are lots of ways to use this method, but I&#8217;ll go for a simple one &#8211; get a list of instances running with the specified AMI ID (also knows as Image ID).<\/p>\n<pre><span style=\"color: #00ccff;\">DescribeInstancesResponse<\/span> response = client.DescribeInstances(\r\n    <span style=\"color: #0000ff;\">new<\/span> <span style=\"color: #00ccff;\">DescribeInstancesRequest<\/span>()\r\n    {\r\n        Filter = <span style=\"color: #0000ff;\">new<\/span> <span style=\"color: #00ccff;\">List<\/span>&lt;<span style=\"color: #00ccff;\">Filter<\/span>&gt;()\r\n        {\r\n            <span style=\"color: #0000ff;\">new<\/span> <span style=\"color: #00ccff;\">Filter<\/span>()\r\n            {\r\n                Name = <span style=\"color: #800000;\">\"image-id\"<\/span>,\r\n                Value = <span style=\"color: #0000ff;\">new<\/span> <span style=\"color: #00ccff;\">List<\/span>&lt;<span style=\"color: #00ccff;\">String<\/span>&gt;()\r\n                {\r\n                    <span style=\"color: #800000;\">\"ami-223c1a1b\"<\/span>\r\n                }\r\n            }\r\n        }\r\n    }\r\n);<\/pre>\n<p>See what I mean by extreme OO? Not only does DescribeInstances take a <strong>DescribeInstanc<\/strong>esRequest, but in turn that takes a List of type Filter who&#8217;s values are a List of type String! The good side to this is you can easily build up filters and each filter can have multiple values (so instead of just one AMI-ID as in the above example, you could specify several and they&#8217;ll all get returned). Conversley you can pass in a <strong>DescribeInstanceRequest<\/strong> with no parameters and you&#8217;ll get every instance available back. There are a lot of filters you can use, the complete list can be seen <a title=\"EC2 DescribeInstances filters\" href=\"http:\/\/docs.amazonwebservices.com\/AWSEC2\/latest\/CommandLineReference\/ApiReference-cmd-DescribeInstances.html\">here<\/a>.<\/p>\n<p>So now you&#8217;ve got a list of instances matching the AMI ID <em>ami-223c1a1b<\/em> right? Well, kind of. What you actually have is an instance of DescribeInstancesResponse. This class has a few functions such as showing the XML response etc. what you want though is the public property <strong>DescribeInstancesResult<\/strong> which then has a public property <strong>Reservation<\/strong> which is of type <strong>List<\/strong>&lt;<strong>Reservation<\/strong>&gt;, more OO! You&#8217;d be forgiven for thinking this is a list of instances as a result of your query: what it actually represents is a list of groups of instances. Why is this? Well from what I can gather, this is because you can request servers to run in bulk with various parameters, each request to run servers is a reservation [happy to be corrected here].<\/p>\n<p>What next then? Well each <strong>Reservation<\/strong> object has a property called <strong>RunningInstance<\/strong> which is actually not a single instance but of type <strong>List<\/strong>&lt;<strong>RunningInst<\/strong>ance&gt;. If you&#8217;re like me, you probably don&#8217;t care about this huge level of abstraction as you simply wanted an actual list of running instances that match your request; so you&#8217;ll probably want code something like this:<\/p>\n<pre><span style=\"color: #00ccff;\">List<\/span>&lt;<span style=\"color: #00ccff;\">RunningInstance<\/span>&gt;() instances = new <span style=\"color: #00ccff;\">List<\/span>&lt;<span style=\"color: #00ccff;\">RunningInstance<\/span>&gt;();\r\n<span style=\"color: #0000ff;\">foreach<\/span>(<span style=\"color: #0000ff;\">var<\/span> instList <span style=\"color: #0000ff;\">in<\/span> response.DescribeInstancesResult.Reservation)\r\n    instances.AddRange(instList.RunningInstance);<\/pre>\n<p>Et voila! A nice simple list of RunningInstance objects you can do whatever you want with (RunningInstance again is part of the AWS SDK, documentation can be seen <a title=\"RunningInstance Class AWS Documentation\" href=\"http:\/\/docs.amazonwebservices.com\/sdkfornet\/latest\/apidocs\/html\/T_Amazon_EC2_Model_RunningInstance.htm\" target=\"_blank\">here<\/a>.)<\/p>\n<h3><span style=\"text-decoration: underline;\">Running New Instances<\/span><\/h3>\n<p>Running new instances, like getting a list of instances uses the same OO approach and returns the same type of OO response (in this case a <strong>RunInstancesResult<\/strong>). An example of this can be seen below:<\/p>\n<pre>RunInstancesResponse response = client.RunInstances(\r\n        <span style=\"color: #0000ff;\">new<\/span> <span style=\"color: #00ccff;\">RunInstancesRequest<\/span>()\r\n        {\r\n            ImageId = <span style=\"color: #800000;\">\"ami-223c1a1b\"<\/span>,\r\n            InstanceType = <span style=\"color: #800000;\">\"t1.micro\"<\/span>,\r\n            SecurityGroup = <span style=\"color: #0000ff;\">new<\/span> <span style=\"color: #00ccff;\">List<\/span>&lt;<span style=\"color: #0000ff;\">string<\/span>&gt;()\r\n            {\r\n                <span style=\"color: #800000;\">\"security-group-name\"<\/span>\r\n            },\r\n            MinCount = 1,\r\n            MaxCount = 10,\r\n            KeyName = <span style=\"color: #800000;\">\"quick-start-1\"<\/span>\r\n    }\r\n);<\/pre>\n<p>These aren&#8217;t all the options available, complete list is <a title=\"RunInstancesRequest EC2 AWS\" href=\"http:\/\/docs.amazonwebservices.com\/sdkfornet\/latest\/apidocs\/html\/T_Amazon_EC2_Model_RunInstancesRequest.htm\" target=\"_blank\">here<\/a>. But it does show you the power you have to control EC2. Majority of the variables are self-explanatory; it is worth nothin the <em>SecurityGroup<\/em> list should be populated by the name of the security group, not the ID (the name is what you see in the EC2 web interface) &#8211; you can however use <em>SecurityGroupId<\/em> instead. The MinCount\/MaxCount properties are very useful, MinCount means &#8220;run at least this many servers, if you can&#8217;t, run none&#8221;; MaxCount means &#8220;run no more than this many servers, but you can run less provided you run at least MinCount&#8221;.<\/p>\n<p>What I do with the response is use <em>response.RunInstancesResult.Reservation.RunningInstance.Count<\/em> which lets me know how many instances EC2 actually spawned (note how as this is a request, <em>Reservation<\/em> here is not a list, it&#8217;s a single object.)<\/p>\n<h3><span style=\"text-decoration: underline;\">What&#8217;s Next<\/span>?<\/h3>\n<p>There is so much more you can do, this really does barely scratch the surface. What I hope it does do though is give you a quick start guide for using the SDK without having to delve too much into the API docs or working out how they like you to call their code.<\/p>\n<p>For those of you who know the AWSSDK and are wondering why I chose the &#8220;inline&#8221; approach rather than using the <em>.With&#8230;()<\/em> methods &#8211; it&#8217;s because I prefer this way of doing it and I find it easier to maintain than to daisy-chain lots of <em>.With&#8230;()<\/em> &#8216;s together.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Amazon&#8217;s EC2 platform has a very in-depth console which allows you to do a lot, but what if you want to automate some of the processes or handling servers? I&#8217;ve been working with EC2 a lot recently and automating server starting\/stopping based on parameters of the system we use here at MediaSkunkworks and thought I&#8217;d &#8230; <a href=\"https:\/\/wade.one\/blog\/2012\/10\/15\/using-amazon-ec2-with-c-net\/\" class=\"more-link\">Read More<span class=\"screen-reader-text\"> &#8220;Using Amazon EC2 with C# .net&#8221;<\/span> &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[13],"tags":[],"class_list":["post-629","post","type-post","status-publish","format-standard","hentry","category-programming"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using Amazon EC2 with C# .net - wade.one<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wade.one\/blog\/2012\/10\/15\/using-amazon-ec2-with-c-net\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using Amazon EC2 with C# .net - wade.one\" \/>\n<meta property=\"og:description\" content=\"Amazon&#8217;s EC2 platform has a very in-depth console which allows you to do a lot, but what if you want to automate some of the processes or handling servers? I&#8217;ve been working with EC2 a lot recently and automating server starting\/stopping based on parameters of the system we use here at MediaSkunkworks and thought I&#8217;d ... Read More &quot;Using Amazon EC2 with C# .net&quot; &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wade.one\/blog\/2012\/10\/15\/using-amazon-ec2-with-c-net\/\" \/>\n<meta property=\"og:site_name\" content=\"wade.one\" \/>\n<meta property=\"article:published_time\" content=\"2012-10-15T13:30:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-04-11T18:23:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/Wade-Logo-cropped.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1518\" \/>\n\t<meta property=\"og:image:height\" content=\"1506\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Wade\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@wadewomersley\" \/>\n<meta name=\"twitter:site\" content=\"@wadewomersley\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Wade\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2012\\\/10\\\/15\\\/using-amazon-ec2-with-c-net\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2012\\\/10\\\/15\\\/using-amazon-ec2-with-c-net\\\/\"},\"author\":{\"name\":\"Wade\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#\\\/schema\\\/person\\\/f9dedd948575256e77a44aa1417f63de\"},\"headline\":\"Using Amazon EC2 with C# .net\",\"datePublished\":\"2012-10-15T13:30:25+00:00\",\"dateModified\":\"2016-04-11T18:23:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2012\\\/10\\\/15\\\/using-amazon-ec2-with-c-net\\\/\"},\"wordCount\":1062,\"commentCount\":6,\"publisher\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#\\\/schema\\\/person\\\/8b4739f8f8bb2cff5d792d4b8779fcc3\"},\"articleSection\":[\"Programming\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wade.one\\\/blog\\\/2012\\\/10\\\/15\\\/using-amazon-ec2-with-c-net\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2012\\\/10\\\/15\\\/using-amazon-ec2-with-c-net\\\/\",\"url\":\"https:\\\/\\\/wade.one\\\/blog\\\/2012\\\/10\\\/15\\\/using-amazon-ec2-with-c-net\\\/\",\"name\":\"Using Amazon EC2 with C# .net - wade.one\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#website\"},\"datePublished\":\"2012-10-15T13:30:25+00:00\",\"dateModified\":\"2016-04-11T18:23:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2012\\\/10\\\/15\\\/using-amazon-ec2-with-c-net\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wade.one\\\/blog\\\/2012\\\/10\\\/15\\\/using-amazon-ec2-with-c-net\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/2012\\\/10\\\/15\\\/using-amazon-ec2-with-c-net\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wade.one\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using Amazon EC2 with C# .net\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/wade.one\\\/blog\\\/\",\"name\":\"wade.one\",\"description\":\"wade womersley - york based software engineer\",\"publisher\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#\\\/schema\\\/person\\\/8b4739f8f8bb2cff5d792d4b8779fcc3\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wade.one\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#\\\/schema\\\/person\\\/8b4739f8f8bb2cff5d792d4b8779fcc3\",\"name\":\"Wade Womersley\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/200px.png\",\"url\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/200px.png\",\"contentUrl\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/200px.png\",\"width\":202,\"height\":200,\"caption\":\"Wade Womersley\"},\"logo\":{\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/200px.png\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/wade.one\\\/blog\\\/#\\\/schema\\\/person\\\/f9dedd948575256e77a44aa1417f63de\",\"name\":\"Wade\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/94100ef7361b8aaac136b852c8df93bdd10942165a122d5c56e4466cc403e5d9?s=96&d=retro&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/94100ef7361b8aaac136b852c8df93bdd10942165a122d5c56e4466cc403e5d9?s=96&d=retro&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/94100ef7361b8aaac136b852c8df93bdd10942165a122d5c56e4466cc403e5d9?s=96&d=retro&r=pg\",\"caption\":\"Wade\"},\"url\":\"https:\\\/\\\/wade.one\\\/blog\\\/author\\\/wade\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using Amazon EC2 with C# .net - wade.one","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wade.one\/blog\/2012\/10\/15\/using-amazon-ec2-with-c-net\/","og_locale":"en_GB","og_type":"article","og_title":"Using Amazon EC2 with C# .net - wade.one","og_description":"Amazon&#8217;s EC2 platform has a very in-depth console which allows you to do a lot, but what if you want to automate some of the processes or handling servers? I&#8217;ve been working with EC2 a lot recently and automating server starting\/stopping based on parameters of the system we use here at MediaSkunkworks and thought I&#8217;d ... Read More \"Using Amazon EC2 with C# .net\" &raquo;","og_url":"https:\/\/wade.one\/blog\/2012\/10\/15\/using-amazon-ec2-with-c-net\/","og_site_name":"wade.one","article_published_time":"2012-10-15T13:30:25+00:00","article_modified_time":"2016-04-11T18:23:44+00:00","og_image":[{"width":1518,"height":1506,"url":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/Wade-Logo-cropped.png","type":"image\/png"}],"author":"Wade","twitter_card":"summary_large_image","twitter_creator":"@wadewomersley","twitter_site":"@wadewomersley","twitter_misc":{"Written by":"Wade","Estimated reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wade.one\/blog\/2012\/10\/15\/using-amazon-ec2-with-c-net\/#article","isPartOf":{"@id":"https:\/\/wade.one\/blog\/2012\/10\/15\/using-amazon-ec2-with-c-net\/"},"author":{"name":"Wade","@id":"https:\/\/wade.one\/blog\/#\/schema\/person\/f9dedd948575256e77a44aa1417f63de"},"headline":"Using Amazon EC2 with C# .net","datePublished":"2012-10-15T13:30:25+00:00","dateModified":"2016-04-11T18:23:44+00:00","mainEntityOfPage":{"@id":"https:\/\/wade.one\/blog\/2012\/10\/15\/using-amazon-ec2-with-c-net\/"},"wordCount":1062,"commentCount":6,"publisher":{"@id":"https:\/\/wade.one\/blog\/#\/schema\/person\/8b4739f8f8bb2cff5d792d4b8779fcc3"},"articleSection":["Programming"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wade.one\/blog\/2012\/10\/15\/using-amazon-ec2-with-c-net\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wade.one\/blog\/2012\/10\/15\/using-amazon-ec2-with-c-net\/","url":"https:\/\/wade.one\/blog\/2012\/10\/15\/using-amazon-ec2-with-c-net\/","name":"Using Amazon EC2 with C# .net - wade.one","isPartOf":{"@id":"https:\/\/wade.one\/blog\/#website"},"datePublished":"2012-10-15T13:30:25+00:00","dateModified":"2016-04-11T18:23:44+00:00","breadcrumb":{"@id":"https:\/\/wade.one\/blog\/2012\/10\/15\/using-amazon-ec2-with-c-net\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wade.one\/blog\/2012\/10\/15\/using-amazon-ec2-with-c-net\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wade.one\/blog\/2012\/10\/15\/using-amazon-ec2-with-c-net\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wade.one\/blog\/"},{"@type":"ListItem","position":2,"name":"Using Amazon EC2 with C# .net"}]},{"@type":"WebSite","@id":"https:\/\/wade.one\/blog\/#website","url":"https:\/\/wade.one\/blog\/","name":"wade.one","description":"wade womersley - york based software engineer","publisher":{"@id":"https:\/\/wade.one\/blog\/#\/schema\/person\/8b4739f8f8bb2cff5d792d4b8779fcc3"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wade.one\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/wade.one\/blog\/#\/schema\/person\/8b4739f8f8bb2cff5d792d4b8779fcc3","name":"Wade Womersley","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/200px.png","url":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/200px.png","contentUrl":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/200px.png","width":202,"height":200,"caption":"Wade Womersley"},"logo":{"@id":"https:\/\/wade.one\/blog\/wp-content\/uploads\/2015\/02\/200px.png"}},{"@type":"Person","@id":"https:\/\/wade.one\/blog\/#\/schema\/person\/f9dedd948575256e77a44aa1417f63de","name":"Wade","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/94100ef7361b8aaac136b852c8df93bdd10942165a122d5c56e4466cc403e5d9?s=96&d=retro&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/94100ef7361b8aaac136b852c8df93bdd10942165a122d5c56e4466cc403e5d9?s=96&d=retro&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/94100ef7361b8aaac136b852c8df93bdd10942165a122d5c56e4466cc403e5d9?s=96&d=retro&r=pg","caption":"Wade"},"url":"https:\/\/wade.one\/blog\/author\/wade\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1124,"url":"https:\/\/wade.one\/blog\/2023\/03\/28\/aws-cloudformation-vs-azure-the-superior-choice-for-devops\/","url_meta":{"origin":629,"position":0},"title":"AWS CloudFormation vs. Azure: The Superior Choice for DevOps","author":"Wade","date":"March 28, 2023","format":false,"excerpt":"In the ever-evolving world of cloud computing, choosing the right cloud service provider can be a daunting task. Two of the most popular platforms, Amazon Web Services (AWS) and Microsoft Azure, are often pitted against each other. Both have their merits, but when it comes to DevOps, AWS has an\u2026","rel":"","context":"In &quot;PHP&quot;","block_context":{"text":"PHP","link":"https:\/\/wade.one\/blog\/category\/php\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":337,"url":"https:\/\/wade.one\/blog\/2009\/11\/18\/superb-vps-virtual-private-server-provider-vps-net\/","url_meta":{"origin":629,"position":1},"title":"Superb VPS (Virtual Private Server) Provider &#8211; VPS.net Review","author":"Wade","date":"November 18, 2009","format":false,"excerpt":"A few months ago at work we realised the need for lots of \"nodes\" (servers) in the UK and in the US initially. We have a lot of data processing that we need to do and we worked out it would be faster and cheaper if we could distribute the\u2026","rel":"","context":"In &quot;Hardware&quot;","block_context":{"text":"Hardware","link":"https:\/\/wade.one\/blog\/category\/hardware\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":671,"url":"https:\/\/wade.one\/blog\/2013\/12\/09\/phantomjs-custom-module-require-and-create\/","url_meta":{"origin":629,"position":2},"title":"phantomjs custom module &#8211; require and create","author":"Wade","date":"December 9, 2013","format":false,"excerpt":"Recently I've been working with phantomjs\u00a0in order to do some on-page control without wanting to use an actual browser (phantomjs is headless and requires no X server to be running). One of the first things I wanted to do was created custom modules so I could organise my code clearly.\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/wade.one\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":556,"url":"https:\/\/wade.one\/blog\/2011\/04\/25\/automating-implemented-methods-for-a-web-based-api\/","url_meta":{"origin":629,"position":3},"title":"Automating &#8220;Implemented methods&#8221; for a web based API","author":"Wade","date":"April 25, 2011","format":false,"excerpt":"In my leedsphp talk last week I mentioned making a developer (and consumers) life easier by automatically implementing the allow methods functionality that your API may expose (e.g. you call PUT on a URL that only allows GET or POST). I did have an example slide there showing how to\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/wade.one\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":982,"url":"https:\/\/wade.one\/blog\/2016\/04\/02\/useful-tidbits-for-raspberry-pi-users-on-raspian-aka-things-i-wish-i-knew-quickereasier\/","url_meta":{"origin":629,"position":4},"title":"Useful tidbits for Raspberry pi users on Raspian &#8211; aka things I wish I knew quicker\/easier","author":"Wade","date":"April 2, 2016","format":false,"excerpt":"I love my Pi2 and my Pi3, they're amazing pieces of cheap kit I can do anything with - although to be honest I don't use them anywhere near as much as I should. So here is a compilation of things I found useful this last week when I finally\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/wade.one\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/wade.one\/blog\/wp-content\/uploads\/2016\/04\/IMG_4090.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/wade.one\/blog\/wp-content\/uploads\/2016\/04\/IMG_4090.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/wade.one\/blog\/wp-content\/uploads\/2016\/04\/IMG_4090.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/wade.one\/blog\/wp-content\/uploads\/2016\/04\/IMG_4090.jpg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/wade.one\/blog\/wp-content\/uploads\/2016\/04\/IMG_4090.jpg?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/wade.one\/blog\/wp-content\/uploads\/2016\/04\/IMG_4090.jpg?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":585,"url":"https:\/\/wade.one\/blog\/2012\/05\/22\/php5-4-3-available-on-dotdeb-org-installs-fine-on-ubuntu\/","url_meta":{"origin":629,"position":5},"title":"PHP5.4.3 Available on Dotdeb.org (Installs fine on Ubuntu)","author":"Wade","date":"May 22, 2012","format":false,"excerpt":"Dotdeb.org have the PHP 5.4 series available for installation on Debian based OS's, you can either do it manually or use my installation script I wrote to make the process easier. All you need to do is run: curl https:\/\/wade.one\/blog\/wp-content\/uploads\/php54.sh | sudo bash And it'll do the rest for you!\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/wade.one\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/posts\/629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/comments?post=629"}],"version-history":[{"count":3,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/posts\/629\/revisions"}],"predecessor-version":[{"id":633,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/posts\/629\/revisions\/633"}],"wp:attachment":[{"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/media?parent=629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/categories?post=629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wade.one\/blog\/wp-json\/wp\/v2\/tags?post=629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}