如何将 AMI 保存到 S3 存储桶?
我已使用 Amazon AWS 控制台创建了 AMI(EBS AMI)。该 AMI 附加了 2 个快照。 现在我想将该 AMI 备份到 S3 存储桶。这可能吗?
我实际上需要执行此操作,然后才能将该 AMI 移动到不同区域中的存储桶并注册该 AMI 以在该不同区域中使用。
有什么线索吗?
I've created an AMI(EBS AMI) using the Amazon AWS console. That AMI has 2 snapshots attached to it.
Now I want to backup that AMI to a S3 bucket. Is this possible?
I actually need to do this to be able to then move that AMI to a bucket in a different region and register that AMI for use in that different region.
Any clues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
更新
我最初的回答仍然适用于此类问题(见下文),但是,考虑到您实际上需要执行此操作才能将该 AMI 移动到 [...] 不同的区域,您将会很高兴 AWS 刚刚发布了跨区域EC2 AMI复制来解决这个长期存在的功能请求:
初步答复
虽然 Amazon EBS 确实提供了创建卷的时间点快照的功能,这持久化到 Amazon S3,此操作超出您的控制范围,完全由 EC2 处理,请参阅相应的常见问题解答我能够使用常规 Amazon S3 API 访问我的快照吗?:
您可以按照 Eric Hammond 的详细文章在 EC2 区域之间复制 EBS 启动 AMI,它将指导您完成所有必需的步骤(尽管相当多)。
Update
My initial answer still applies concerning the question as such (see below), however, given you actually need to do this to be able to then move that AMI to [...] a different region, you will be pleased that AWS has just released Cross Region EC2 AMI Copy to address this long standing feature request:
Initial Answer
While Amazon EBS indeed provides the ability to create point-in-time snapshots of volumes, which are persisted to Amazon S3, this operation is outside of your control and entirely handled by EC2, see the respective FAQ Will I be able to access my snapshots using the regular Amazon S3 APIs?:
You can achieve your goal by following Eric Hammond's elaborate article Copying EBS Boot AMIs Between EC2 Regions, which guides you through all required steps (quite some though).
这不是一项微不足道的任务。我在许多博客和参考文献中看到过这个网站,但我自己没有使用过。
您可能想尝试CloudScripts,特别是为了满足您的需要,这个特定的脚本:https://cloudyscripts.com/tool/show/4
希望这有帮助。
That is not a trivial task. I have seen this site referenced in many blogs and references, but I have not used it myself.
You might want to try CloudScripts and in particular for your needs this particular script: https://cloudyscripts.com/tool/show/4
Hope this helps.
除了 AMI
复制功能
,现在您还可以使用 AWS CLI 将它们导出到 S3 或从 S3 导入它们。检查:https://docs.aws.amazon。 com/cli/latest/reference/ec2/export-image.html
您可以使用
VMDK
作为导出/导入格式。就我而言,我在导出和参考期间遇到了一些与角色相关的奇怪问题
Other than AMI
Copy feature
, now you can use AWS CLI to export and import them to and from S3.Check: https://docs.aws.amazon.com/cli/latest/reference/ec2/export-image.html
You can use
VMDK
as the export/import format.In my case I encountered some strange Role related issue during the export and the reference here helped.