Creating an ec2 AMI with an ebs backed instance - is it possible

纵然是瞬间 提交于 2019-12-25 04:39:34

问题


Following the instructions at http://aws.amazon.com/articles/1663?_encoding=UTF8&jiveRedirect=1 I created an instance with mysql's dbs running on an EBS volume.

I've been installing other software on the instance's filesystem (not the EBS volume) and would like to be able to save the whole it as an AMI.

In Elasticfox, both AMI commands were greyed out.

Is it not possible to do this?


回答1:


I am not so familiar with ElasticFOX, but in general you cannot create an AMI of an EC2 instance created from instance-store explicitly. You need a series of ec2-ami-tools to create one. I have wrote a script which I used to create an AMI. Feel free to use.

Copy the following script:

https://github.com/rakesh-sankar/Tools/blob/master/AmazonAWS/AMI/CreateAMI.sh

-make sure, you update the following before use

  1. Imagename Shortname
  2. Path to priavetKey
  3. Path to certificateKey
  4. S3 User-id (in general, this is yourAWS account ID)
  5. Bucket Name
  6. Path to JavaHome

Give permission to the file.

chmod +x createAMI.sh ./createAMI.sh

It should create an AMI image under your account and register it with the name you have given.



来源:https://stackoverflow.com/questions/4475532/creating-an-ec2-ami-with-an-ebs-backed-instance-is-it-possible

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!