-1

I don't quite "get" Amazon's EC2. I begin by starting a new EC2 instance. I then access it via Remote Desktop or ssh. I then customize it to my needs, such as setting up a web server on it, and setting up a web service on it for someone's consumption. Whatever I want.

But what I don't get is this: Now I shut down this instance to avoid getting billed 24/7 - supposedly one of the benefits of EC2. What then? Is my data gone? Next time I start up an instance, I'll have to do the customization (setting up the web server, etc.) all over again, am I right? So what was the point of it all?

I just don't "get" EC2 and what its actual purpose is. Sounds like a hassle to set the whole thing up every single time you need it. In some ways it looks like what other companies call "virtual" or "dedicated" servers, except the EC2 ones are just temporary. Can someone please clarify the purpose of EC2 and provide some real-world use cases?

ec2
  • 7
  • 1

2 Answers2

3

You can create your instance as an EBS-backed instance. Then, if you do shut it off, you only incur a very minimal cost (for the EBS storage). You can re-launch your server from EBS storage very quickly.

If you buy a physical server, you are paying for it 24/7, in the sense that you amortize the cost of purchase over time and presumably pay someone (or use your own time) to maintain the server. Same is true for shared or dedicated hosting. With cloud solutions, you can (within some limits) only pay for the resources you need, when you need them.

Community
  • 1
  • 1
Eric J.
  • 147,927
  • 63
  • 340
  • 553
2

Normally you'd use EC2 for sites that need varying capacity, like for example ticketing websites that have high load at the release of an event, and low load otherwise. Since you only pay for capacity when you really need it, it's a pretty good value for that use case.

When you have that kind of load, you really want to script your setup so that you can spin up hundreds of web servers when needed and have them install themselves on first bootup, and not install hundreds of machines and keep state/keep them constantly updated.

If you really want to use it as a regular hosting provider and have a disk that saves your state between reboots, you can use bootable EBS disks and save your state there. If you have that kind of consistent load though, you may find it cheaper to use a regular hosting provider.

Joachim Isaksson
  • 176,943
  • 25
  • 281
  • 294