Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
tip: Temporary instances with automatic shutdown
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Eric Hammond  
View profile  
 More options Feb 27, 8:41 pm
From: Eric Hammond <ehamm...@thinksome.com>
Date: Fri, 27 Feb 2009 17:41:01 -0800 (PST)
Local: Fri, Feb 27 2009 8:41 pm
Subject: tip: Temporary instances with automatic shutdown
A common problem I hear from both new and experienced EC2 users is the
mistake of forgetting to shut down instances which were started to do
short term tasks.

So far this year, I've probably spent $40 in charges I could have
avoided by terminating instances when I stopped needing them.  Often,
I know when I start an instance that it is only to test a short
process and I don't expect to have it running more than the first
hour.

Here's a trick which can be used to start an instance and have that
instance shut itself down in 50 minutes:

  ec2-run-instances AMIID --key KEYPAIR --user-data '#!bin/sh
  shutdown -h +50 >/dev/null &'

Note that this is a two line command with a newline after #!/bin/sh

When you ssh in to the instance, you will get a repeated warning
letting you know how long you have until the instance terminates.

If at any point you wish to cancel the automatic shutdown and keep
that system up, you can use the command:

  sudo shutdown -c

I chose 50 minutes to keep the EC2 charge under a single hour allowing
for startup and shutdown which may take a couple minutes, depending on
the image.

This works on any AMI which supports user-data scripts including the
Ubuntu and Debian images I publish on http://alestic.com and the
latest official Ubuntu beta2 images.

--
Eric Hammond


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sgheeren@hotmail.com  
View profile  
 More options Feb 28, 7:39 am
From: "sghee...@hotmail.com" <sghee...@hotmail.com>
Date: Sat, 28 Feb 2009 13:39:05 +0100
Local: Sat, Feb 28 2009 7:39 am
Subject: Re: [ec2ubuntu] tip: Temporary instances with automatic shutdown
That's a nice tip

I've yet to forget to shutdown a EC2 instance for the first time, but I
reckon I would eventually :)

Seth


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Art Zemon  
View profile  
 More options Mar 2, 9:31 am
From: Art Zemon <a...@hens-teeth.net>
Date: Mon, 02 Mar 2009 08:31:32 -0600
Local: Mon, Mar 2 2009 9:31 am
Subject: Re: [ec2ubuntu] tip: Temporary instances with automatic shutdown
Eric,

That's sweet. Thank you. We run a server backup product based on your
old Aelestic AMI and I can use that trick when people want restorations.

BTW, if you want to see our product, take a look at
http://www.hens-teeth.net/html/products/nest_egg_backup.php

Cheers,
    -- Art Z.

--

Art Zemon, President
Hen's Teeth Network <http://www.hens-teeth.net/>
Phone: (866)HENS-NET or (636)447-3030 ext. 200


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google