I am pretty new to Amazon Web Services. I have launched a non-EBS instance of a server from an AMI and have done some configuration. I want to stop the server now, but I only see options to Reboot and Terminate.
I understand that if I terminate everything is gone. I thought that I could make a "snapshot" of this configuration which could be stored in S3 or something, so that I could later use the snapshot as an AMI and launch that instead.
Obviously I have something wrong - can someone correct me where I am off base? Thanks.
When you say, non-EBS, you mean EC2 instance store-backed machine. There is no direct menu option provided in AWS console to snapshot your instance store machine. This facility you get when you have machine backed by EBS (also, you'd see other convenient options for EBS backed machines).
So, for instance stored backed machines, you need to get your hands dirty. Up your sleeve, here is what you need to do:
Create a bucket in S3.
Get EC2-AMI-Tools
, and also EC2-API-Tools
on your machine/instance. export
their bin
folders to your $PATH
Use ec2-bundle-volume
to bundle up your instance into a AMI package. (this would not bundle up certain directories, e.g. /mnt
, /dev
,...)
Upload your bundle to your bucket using ec2-upload-bundle
command.
Then you can register your AMI,using ec2-register
command.
This AMI is now registered as your private AMI. You can see it in your AWS Web Console under AMIs
. You can launch this AMI, and it will be in the same state as your instance was, when you created your AMI.
Refer:
- Amazon guide on how to create AMI
- Short and sweet article from RightScale
A bit more about ec2-bundle-volume, ec2-upload-bundle and ec2-register you can find here