How to speed up creation of AMI (Amazon Machine Image)?

那年仲夏 提交于 2020-01-23 04:26:07

问题


AMI creation takes a long time. Are there ways to make it happen faster?

E.g. perhaps by changing some of the AMI creation settings, perhaps regarding IOPS, volume type, device, etc. I don't know how to change these or if it could help. So I am not sure of any ways speed up the AMI creation process at this stage.


回答1:


An AMI uses the same 'backup' mechanism as a snapshot. Any blocks that are modified from the original AMI/snapshot need to be copied to Amazon S3.

So, in theory, if you launched an instance from an AMI, and then immediately made a new AMI from the instance, it should be created rather quickly because comparatively few blocks should have changed.

On the other hand, if an instance had been running for a long time and had updated lots of data on the disk, it would take longer to copy the 'changed' blocks to S3.

You should be able to speed the AMI creation process by taking a recent snapshot of the volume, which would copy the changed blocks to S3. Then, when making an AMI soon after, there would be rather few blocks changed.

If you experiment with this, let us know how you go!



来源:https://stackoverflow.com/questions/56971950/how-to-speed-up-creation-of-ami-amazon-machine-image

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