Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am attempting to understand that if I use the command shutdown -h now on a Linux instance running on AWS, does it terminate or simply stop the instance. There doesn't appear to be any official documentation regarding it.

share|improve this question
    
OK, my understanding of AWS was not as deep as I thought, so I deleted my misinformed answer. Two points: this question needs official (from AWS itself) definitions of "terminate" and "stop". And a more general way to title the question might be "When the OS tells its AWS instance to power down, what happens? Terminate? Stop? Something else? –  Isaac Rabinovitch Apr 25 '13 at 22:42
    
@Isaac Rabinovitch - Thanks. There doesn't appear to be any documentation from AWS regarding it. –  PeanutsMonkey Apr 26 '13 at 3:06

2 Answers 2

When you create a new instance, whether via the console, the EC2 API, or CloudFormation, you can specify the behavior on shutdown as either stop or terminate by the value of the InstanceInitiatedShutdownBehavior option. The default value is stop. You can change this behavior at any time after the instance is created if you want.

Stop means the instance still exists, but it is shutdown. It still has an instance-id, but its virtual RAM is discarded, as are any ephemeral (also called instance) storage volumes (but not an EBS volumes). You can get information about the instance using the API and its instance-id. You can restart the instance in the future. While it is stopped you will be not be paying for run time, though you will pay for any EBS volumes attached to the instance. Amazon's EC2 documentation here has some more details.

Terminate means that the instance no longer exists. You can't restart it, though you could always create a brand new one from scratch or from a saved snapshot.

The only time I configure an instance to terminate on shutdown is when I create one to perform just some specific task. I program it to shutdown when it has finished and saved the result elsewhere, and know that will make it terminate so I don't have to worry about remembering to go terminate it myself later.

share|improve this answer

It depends on how you configured the AWS instance at launch. Typically a shutdown stops the instance. If you selected Terminate on shutdown it will be terminated instead.

you are using # Shutdown -h so you are asking the system to halt.

Try using # poweroff instead?

share|improve this answer

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.