AWS Snapshot AMI

2019-04-01 17:24发布

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.

2条回答
【Aperson】
2楼-- · 2019-04-01 17:37

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:

  1. Create a bucket in S3.

  2. Get EC2-AMI-Tools, and also EC2-API-Tools on your machine/instance. export their bin folders to your $PATH

  3. Use ec2-bundle-volume to bundle up your instance into a AMI package. (this would not bundle up certain directories, e.g. /mnt, /dev,...)

  4. Upload your bundle to your bucket using ec2-upload-bundle command.

  5. 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:

查看更多
趁早两清
3楼-- · 2019-04-01 17:38

A bit more about ec2-bundle-volume, ec2-upload-bundle and ec2-register you can find here

查看更多
登录 后发表回答