Aws-cleanup
From Bashlinux
Cleaning up
Shutting down an instance
There are 2 ways to turn of the instance
Internal
You can shut down the machine running in the remote terminal
-bash# /sbin/shutdwon -h now
External
The instance can be turned off using the API tools
# ec2-terminate-instances i-577aae3e
Deregistering an AMI
If the AMI is no longer needed it can be de-registered using the following command:
# ec2-deregister ami-43ab4f2a
Removing an AMI from Amazon S3
If the AMI has been deregistered 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