-2

I would like to use Amazon EC2 as an emergency backup database+web server in the event our primary host becomes unavailable. I feel like I wouldn't have trouble setting up a Windows instance, install SQL Server and get the web server up and running (would take a few hours, plus installing various libraries, our source code, etc).

My question relates to pricing. If I simply "stop" the instance rather than "terminate" it, does that stop counting "instance-hours"? I would prefer not to terminate the instance and lose all that work I spent setting it up. If I must "terminate" in order to stop the billing - is it possible to make an image of the server after I have set it all up, then save that image somewhere (S3?) Is this something that people do regularly?

Ideally this instance would just be waiting in the wings for an issue with our host, but costing us nothing except perhaps data storage costs.

MikeMurko
  • 204
  • 2
  • 12
  • 1
    Wouldn't you need the database online so you could replicate to it, anyway? Or are you planning on restoring a backup to the EC2 instance for your failover? –  Oct 21 '12 at 07:08
  • Restoring a backup yeah. Ideally there would be some replicated source (either via log shipping with acceptable data loss, or using sql mirroring/replication) – MikeMurko Oct 22 '12 at 14:43
  • Please leave a comment instead of flippantly down voting. I think this is a valid question regarding EC2 implementations. – MikeMurko Oct 29 '12 at 03:36

1 Answers1

4

So yes, when you stop an EC2 instance, it stops accumulating instance hours. However, if you want to keep your setup for it, you'll need a non-ephemeral EBS volume to use as it's root drive (IIRC by default when you stop an EBS instance the default root volume is reset to the snapshot, but you can change that behavior.)

So while you don't have to pay for the EC2 instance hours, you do still have to pay for your EBS storage.

I believe there is also a way to bundle your configuration into an AMI (Amazon Machine Image) once you've built it, but I think you also need to keep that in EBS or S3... Possibly worth researching though.

  • 1) Did you mean "stop an EC2 instance the default root ..."? 2) On the EC2 FAQs, it says "Billing ends when the instance terminates, which could occur through a web services command, by running “shutdown -h”, or through instance failure." Does that not conflict with what you were saying about stopping an instance? – MikeMurko Oct 22 '12 at 14:49
  • @MikeMurko That FAQ's a little odd. It almost sounds like it was written for instance storage and never updated with EBS. Do note this bit, though: "Instance-hours are billed for any time your instances are in a “running” state." – ceejayoz Oct 24 '12 at 18:36
  • @MikeMurko yeah I meant EC2 instance. I'm not sure what you mean about conflicting with the FAQ: When the instance is stopped, you stop paying for it. The EBS volumes are not stopped with the instance, they are separate from it and billed separately. If you want to keep your root volume and start a new EC2 instance from it, you can, but you have to pay for the EBS storage that volume uses even when it is not attached to an instance. –  Oct 25 '12 at 01:26