Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have got two websites hosted on Amazon AWS and my traffic is anything but splendid, but still I need to keep them up and running. I have two elastic IPs. I am not 100% familiar with what is going on there exactly, but about half a year ago I followed some blog posts and achieved to host my own websites on EC2. Now, I pay about 40 USD per month which is quite a lot compared to other hosting companies, where you only pay 5 USD per month for multiple domains. Am I doing something wrong ? I initially opted in to use the advertised free tier, but ended up paying hourly per launched instance (I don't even know why).

Can somebody give me advice on how to use EC2 properly, or at least lead me into the right direction ?

About 99.5% of my bill is for paying the 0.020 USD per hour, for example last month's bill was pretty much made up of this:

$0.020 per Micro Instance (t1.micro) instance-hour (or partial hour) [1,488 Hrs]

which amounted to roughly 30 USD and then I have to add tax and my Route 53 Hosted Zones, which results in above mentioned 40 USD.

I would be very grateful for anyone to help me bring down these costs.

share|improve this question
3  
a) There are 730 hours in a month - 1488 means you are running 2 instances - your bill is 2x what it should be. b) if you are running the server 24/7, and will continue to do so, you should use a reserved instance. There are 24*365 = 8760 hours in a year. At $0.02 you would spend $175.2 on instance costs ($14.60/mo). If you purchase a 1 yr, heavy-utilization reserved instance you pay: $62 (upfront) + $0.005/h = 105.8 for the year ($8.81/mo) and if you go with the 3 yr, heavy, you pay (77.13/yr = $6.43/mo). Note: with heavy reservations - you pay even if you don't run the instance) –  cyberx86 Feb 3 at 0:26

2 Answers 2

up vote 4 down vote accepted

There are several things wrong with your costs.

Firstly, you need a single instance and the associated components - for both your sites. From your descriptions it sounds like you are running two instances, each one having its own elastic IP.

Amazon bills by the instance-hour - in a month there are 730 hours (24*365/12) - so if you run one instance for a month, you will be billed for approximately 730 hours. You have indicated that you were billed for 1488 hours - which is just over double 730 (take a month with 31 days, you get 24*31*2 = 1488). If you qualify for the free tier (and t1.micro instances do) the first 730 hours of t1.micro usage in the month will be free. (Your bill would have looked like:

  • USD 0.00 hourly fee per Linux/UNIX (free tier), t1.micro instance 744h 0.00
  • USD 0.02 hourly fee per Linux/UNIX, t1.micro instance 744h 14.88

If you have only had this account for half a year, it is quite possible you are actually running 3 instances - one falling under the free tier, and the other two are what you are being billed for.

AWS really shines at on-demand tasks - where you need to suddenly launch 10 servers for a couple of hours to handle a spike in demand. If you are going to be running a constant number of servers, you should look into reserved instances. With reserved instances, you pay an up-front fee - for either a 1 year or 3 year term, and get a reduced hourly rate. There are three types of reserved instances, depending on the proportion of time you expect to be running the server: light-utilization, medium-utilization, and heavy-utilization. With all reservations the upfront fee is non-refundable. With the light and medium utilization instances though, you only pay the hourly fee if you use the instance. With the heavy utilization reservation, you pay the hourly fee regardless of whether or not you use the instance.

Let's run the numbers on the scenarios:

  • 1 year has 24*365 = 8760 hours
  • On demand ($0.02) = $175.20 for the year ($14.60/mo)
  • 1 year - heavy reservation ($62 (upfront) + $0.005/h) = $105.80 for the year ($8.81/mo)
  • 3 year - heavy reservation ($100 upfront + $0.005/h) = $77.13 for the year ($6.43/mo)

The one downside of the reserved instances is that if you lock in your costs and AWS subsequently reduces their rates, you do not get the new lower rate. Despite this, reserved instances are still an excellent option, and there remains the possibility of selling the reserved instance (or buying one) on the AWS Marketplace which offers a few additional options.

share|improve this answer
    
Great comment (above) and great answer, thank you! I guess I have been doing it wrong all along. I feel like a moron having paid that much for so long. That's the price you have to pay for your own stupidity I guess. –  the_critic Feb 3 at 10:54
    
The ultimate question that arises, though, is "Why would I even go with EC2 then ?". Web hosting companies offer a much better price/value ratio at 6$/month for example. That is equally as much I would have to pay upfront only for the RI. –  the_critic Feb 3 at 11:07
    
I can imagine why this could be helpful in the case of an application, but purely for web hosting, it seems kind of expensive. –  the_critic Feb 3 at 11:13
1  
AWS is great for certain things a) hosting a static site - use S3, don't run an EC2 instance at all. b) Flexibility - it is basically a VPS - so if you want to be in control it is comparatively inexpensive. c) Evolving - if your needs are likely to change over the near future, you can easily scale by adding more instances. EC2 isn't really intended as a replacement for a shared hosting plan, although it lowers the barrier to entry into areas of server administration. –  cyberx86 Feb 3 at 19:47
    
Thank you very much, sir! –  the_critic Feb 4 at 12:53

The Amazon free tier is only valid for 12 months since creation of your account and it has quite strict guidelines in terms of what you can do - if you've stuck by these and still being charged, it's best to contact Amazon billing and ask them why.

It really depends what instances you're running, what AMI you've used to launch the instances, how much disk space you're using, how much I/O activity you have going on the servers, how much bandwidth you're using and if you're using other Amazon services. Without being able to see the activity statement, it's hard to analyse it. Usually if you give the Amazon billing department an e-mail, they will be able to help you out quite well.

If you have anything more specific about the usage though, I'm happy to help you answer it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.