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 am running a side-project on EC2 with an Ubuntu image because I need to do some computing intensive things there.

Now I don't need to do them each and every day right now (mostly because I do most development on weekends) and I would like to find a way how to prevent to pay EC2 24/7.

I understand that shutting down an instance requires that everything you did on that image is gone so my question is: Is there any way that I could create an image before I shut down an instance (to prevent costs) and then load that image, start a new instance and continue where I left off?

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

There sure is:

http://docs.amazonwebservices.com/AmazonEC2/dg/2006-06-26/bundling-an-ami.html

That said, you probably won't want to do this after each and every session. You should do this once after installing and configuring your software, and mount an elastic block device to store your data.

share|improve this answer
add comment

As luke pointed out, creating an AMI at the end of every session will work, but it looks like a high time demand task to do so often. I will probably tackle the me situation creating a script to install the applications that I use and using EBS to store the important information.

To exemplify it:

I will create a script that will do the following:

 #/sbin/bash -e
 yum -y update
 yum -y install httpd
 yum -y install php
 yum -y install mysql 
 svn checkout [url] /var/www/html/yourrepodestination
 service httpd start

Then I will make sure that I store the data that you need, on an EBS volume and make sure that the script will connect the ebs to my dev environment.

I hope this helps. Let me know if you need me to make something more clear.

thanks,

Geo

share|improve this answer
add comment

You don't need the image to change. Make your image capable of loading a dataset from elsewhere (your hard drive, a remote server, or maybe S3, for instance) on startup, and then resuming. Then make it save the dataset there when it shuts down.

share|improve this answer
add comment

Your Answer

 
discard

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