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

I'm planning to bring up a few EC2 Spot Instances in the near future but, before I do, I have a couple of questions that I couldn't find answers to in the documentation.

I was curious if it was possible for a spot instance to reanimate after it's terminated. I understand once a instance is dead, it's dead forever, but if you keep the EBS volume from terminating and keep the lease on the IP address (reserving it), could you dynamically reassign these to the newly spawned instance?

Thanks for any help you could provide.

Edit: S3 would be great if it supported incremental file changes but, if I use that, then the entire file this instance is working on would be reuploaded every time and that just wouldn't work. Furthermore, this isn't a queueable task. S3 would be great for data backup and restoration for periods when the spot instance is terminated. Does Amazon give the instance the opportunity to do this? (I only need to move 1GB at a time or less to S3 if dynamic EBS is out of the question.)

share|improve this question
1  
It might help to explain what you're trying to achieve here, sounds like you're fighting against the ideal use case for spot instances. –  Drew Khoury Feb 18 '14 at 20:39
    
I feel like I'm emphasizing what a spot instance is all about. This is an interruption tolerant task I'm trying to do, but it needs to pick up exactly where it left off (with the same data and the same EBS volume. I'm not sure why I said I needed the same IP. That's not required.) But I suppose that brings up another question. When spot instances are terminated, does Amazon give the instance the chance to save out of EC2 to, say, S3? Maybe a termination script? I prefer the former. –  Osmium USA Feb 19 '14 at 2:40

1 Answer 1

The best way to use spot instances is to treat EC2s as a compute machine.

You can take advantages of other services, like AWS SQS and AWS S3 for an optimal setup.

For example you could load SQS with a list of tasks and have a micro EC2 on-demand read the SQS Queue and automatically launch a new spot instance to take new jobs off the queue.

The EC2 spot instance that gets launched can do the computation and send results directly to S3. It can keep picking tasks off the queue and keep sending data to S3.

Another use case for spot instances is for additional computer power. You could have a load balancer try to bring up spot instances to deal with additional load, otherwise revet to on-demand instances when demand is too high.

While you could use an EBS volume and re-attach it to your spot instance, you should consider other methods, such as S3, as that helps make your compute layer (your EC2s) more resilient to their inevitable termination.

share|improve this answer
    
S3 would be great if it supported incremental file changes but, if I use that, then the entire file this instance is working on would be reuploaded every time and that just wouldn't work. Furthermore, this isn't a queueable task. S3 would be great for data backup and restoration for periods when the spot instance is terminated. Does Amazon give the instance the opportunity to do this? (I only need to move 1GB at a time or less to S3 if dynamic EBS is out of the question.) –  Osmium USA Feb 19 '14 at 18:20
    
Update your question with your requirements so people can answer your question properly –  Drew Khoury Feb 19 '14 at 20:09

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.