Skip to main content

Cloud Hosting - Amazon EC2

style="" >So recently I got the chance to deploy my first application to Amazon EC2. 
I've got to say after a little bit of trial and error I think the service is pretty amazing and is definetly the future of web hosting and you sure can't beat the price US $0.125 / Hour which is essentially US $90 / month. Bandwidth between S3 and your Ec2 instance costs nothing so is very attractive for Media Transcoding and other such tasks.
The requirements were as follows:
IIS 6.0
Ideally I would want to host the Application on a Windows Server 2008 instance so that I could leverage the features of IIS 7.0 and also have a dedicated SQL Server 2008 instance, but unfortunately Amazon does not support this yet and it's unclear when this will happen so I had to use a makeshift approach.
To manage your instances you can and should use the Firefox Plugin ElasticFox. It makes it very easy and I didn't have to read the documentation once.
The AMI (Amazon Machine Image) that I used as a base was ami-b13cd8d8
which is a 32-Bit Windows Server 2003 with:
  • IIS
  • SQL Server 2005 Express
  • ASP.NET 
The first thing I did was uninstall SQL Server 2005 Express and then downloaded all the bits and pieces I needed. The download speeds were highly impressive, SQL Server 2008 Express which is about 500MB downloaded in less than 10 minutes and it's cheap too.
Unfortunately I didn't know enough about Data Persistance and the lifetime of Instances and so I saved all the downloads I need on the D:\ that is available on the Instance.
This turned out to be a mistake as when it comes to Bundle your configured instance into an AMI anything on the D:\ is not persisted.
So you have two options, either store any files on the C:\ or use an Elastic Block Store.
Without going into too much detail an EBS is a Logical Drive that you can attach to an instance and in my case is where I chose to store all Application files and Data.
Unfortunately the same EBS Volume cannot be attached to multiple instances, but there is the ability to create a snapshot of the EBS then create a new Volume based on the Snapshot. 
After I had configured my instance sans Application specific files it was time to bundle it into an AMI, this requires an Amazon S3 to store the AMI in.
Leave a comment if you want me to make the AMI public as it will save you a lot of time.
Now it was time to install the Application onto my newly created AMI.
The application itself is an ASP.NET MVC Web Application numerous IIS Hosted WCF Web Services.
As I mentioned I installed all the application specific files on my EBS Volume and set the SQL .MDF and .LDF files to be stored on the volume as well then set up IIS accordingly.
Installing the MVC app on IIS 6.0 requires a little bit of working to make the Routing work, see
for more info. I'm hoping Amazon will introduce Windows Server 2008 soon.
There are a few more things I need to resolve which include:
  • Distributed Cache
  • Multiple Instances
  • Dynamic DNS
  • Load Balancing
All in all I am very impressed with this service and whilst at the moment I am only researching this, I think it can't be ignored.
Next up I'm going to go through the same process with GoGrid.
Windows Azure looks very promising, however without Full SQL Server support it's not particularly useful at this stage as SQL Server Data Services is too immature for a Production system and the cost of changing from an ADO.NET Data Access layer to SSDS is too high at this stage. Also there has been no indication on Pricing or Service Level Agreements so we'll just have to wait and see.
Once there is an SSDS Adapter for Entity Framework then and only then could I consider changing my Data Access Layer. 


  1. Cloud hosting literally means your website is served on a web server cluster with many, many web servers handling all of your visitors. Our hosting platform grows and expands automatically as needed… instantly.

  2. Cloud Computing has various flavors, each purposely aimed at aligning with the varying business modules prevalent today. Managed Cloud Hosting is ideal for businesses that give precedence to factors like impregnable security and high availability instead of costs being incurred.

  3. It's really very difficult in this full of activity life to
    listen news on TV, therefore I only use world wide
    web for that purpose, and get the latest information.

  4. Very informative blog post... This blog provide complete information on EC2. Here I want to share more informtion on AWS EC2 backup solutions. Thanks


Post a Comment

Popular posts from this blog

Freeing Disk Space on C:\ Windows Server 2008

  I just spent the last little while trying to clear space on our servers in order to install .NET 4.5 . Decided to post so my future self can find the information when I next have to do this. I performed all the usual tasks: Deleting any files/folders from C:\windows\temp and C:\Users\%UserName%\AppData\Local\Temp Delete all EventViewer logs Save to another Disk if you want to keep them Remove any unused programs, e.g. Firefox Remove anything in C:\inetpub\logs Remove any file/folders C:\Windows\System32\LogFiles Remove any file/folders from C:\Users\%UserName%\Downloads Remove any file/folders able to be removed from C:\Users\%UserName%\Desktop Remove any file/folders able to be removed from C:\Users\%UserName%\My Documents Stop Windows Update service and remove all files/folders from C:\Windows\SoftwareDistribution Deleting an Event Logs Run COMPCLN.exe Move the Virtual Memory file to another disk However this wasn’t enough & I found the most space was

3 Reasons Why Progressive Web Apps (PWAs) Won’t Replace Native Apps

Many people believe Progressive Web Apps (PWAs) are the future of the mobile web, but in my opinion, PWAs are not a replacement for native mobile apps. Here are three reasons why: 1. Native mobile apps provide a smoother & faster experience  Mobile websites, progressive or otherwise are slower and not as smooth. 90% of the time spent is spent using apps vs the browser . The single most significant contributing factor to a smooth experience on mobile is the speed of the network and latency of the data downloaded and uploaded. When you visit websites on desktop or mobile, there is a lot of third-party code/data that gets downloaded to your device, which more often than not has zero impact on the user experience. This includes: CSS (Cascading Style Sheets) JavaScript Ad network code Facebook tracking code Google tracking code The median number of requests a mobile website makes is a shocking  69 . On the other hand, native apps only get the data that is requi

CPF Contribution Rates for new Singapore Permanent Residents (SPR’s)

Recently my wife and I applied and got approved for Singapore Permanent Residency. After completing the formalities the most significant immediate change is the contribution to CPF which is Singapore’s mandatory social security savings scheme requiring contributions from employers and employees. CPF contributions start from the date you obtain SPR status, which is the date of the entry permit.   Being a relentless budgeter I needed to know exactly how much I and my employer would have to contribute so that I could adjust my budget accordingly as the employee contributions get deducted from the monthly salary. After doing some research I discovered that there is a “graduated” approach to CPF contributions for new SPR’s where the contributions gradually increase in the first and second year and then upon reaching the third year are at the full amount. Note: There is an option for employers to contribute the full amount for year 1 and year 2 and the employee can use the graduated ra