Stopping an AMI
From Bashlinux
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
[root@ec2 ~]# /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