Stopping an AMI

From Bashlinux
Revision as of 23:28, 9 June 2015 by Manpaz (talk | contribs) (Created page with "__NOTOC__ === How to shut down an instance === There are 2 ways to turn off a running instance * '''Internally from inside the instance''' You can shut down the machine runnin...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How to shut down an instance

There are 2 ways to turn off a running instance

  • Internally from inside the instance

You can shut down the machine running in the remote terminal

-bash# /sbin/shutdwon -h now
  • Externally from the API

The instance can be turned off using the API tools

# ec2-terminate-instances i-577aae3e

How to de-register an AMI

If the AMI is no longer needed it can be de-registered using the following command:

# ec2-deregister ami-43ab4f2a

How to remove an AMI from Amazon S3

If the AMI has been de-registered and is no longer needed it can be removed in order to avoid to be charged for storage the AMI on Amazon S3, to remove it run the command:

ec2-delete-bundle -b bashlinux -p bashlinux-general-server -a pk-PJ12XQWP23APPWWLR.pem -s cert-PJ12XQWP23APPWWLR.pem