下载 Amazon EC2 AMI?
我想下载一个公共 Amazon EC2 AMI,例如 这个 (Ubuntu Lucid) ,以便我可以通过编程方式提取其内容。
我该怎么做?我怀疑某处有一个S3地址? 这篇博文看起来曾经描述过这个过程,但该链接似乎不再有效。
到目前为止,我只能找到有关如何在 AWS 中移动 EC2 实例的解释。我相信清单文件是这个难题的重要组成部分。
I would like to download a public Amazon EC2 AMI, such as this one (Ubuntu Lucid), so that I can programmatically extract its contents.
How do I do this? I suspect there is an S3 address somewhere? This blog post looks like it once described this process, but the link seems to no longer work.
So far I can only find explanations of how to move around EC2 instance within AWS. I believe manifest files are an important piece of the puzzle.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
使用 ec2-download-bundle在AMI 工具中下载 AMI。创建实例,然后立即创建 AMI。使用 ec2-download-bundle 检索和解密 AMI。
Use the ec2-download-bundle in the AMI Tools to download AMIs. Create an instance, then immediately create an AMI. Use ec2-download-bundle to retrieve and decrypt the AMI.
我至少可以想到两种方法:
将 AMI 导出到 S3
遵循(令人惊讶的复杂)EC2 VM 导出文档 将 AMI 导出到 S3,然后从 S3 下载。
这可能适用于某些 AMI,但遗憾的是,当我尝试它时,它对我不起作用,因为我试图下载从 Amazon Lightsail 快照导出的 AMI,这显然失败了aws.amazon.com/vm-import/latest/userguide/limits-image-export.html" rel="nofollow noreferrer">先决条件:
但是,有效的是以下方法:
将卷附加到EC2 实例
挂载
它、检查它、从中rsync
等)。I can think of at least two approaches:
Exporting the AMI to S3
Follow the (surprisingly complicated) EC2 VM export docs to export the AMI to S3, then download from S3.
This may work for some AMIs, but sadly it didn't work for me when I tried it because I was trying to download an AMI exported from an Amazon Lightsail snapshot, which apparently fails the prerequisites:
What did work, however, was the following approach:
Attaching the volume to an EC2 instance
mount
it, inspect it,rsync
from it, etc.).似乎一种方法是直接从公众那里创建一卷。然后,您可以运行一个实例,安装从 ami 创建的卷,并使用任何文件传输方案从实例下载文件。
Seems an approach would be to create a volume directly from the public ami. Then you could run an instance, mount the volume you created from the ami, and download the files from the instance using any file transfer scheme.
您是否有真正想要解决的问题?
因为如果存在,并且您需要特定 AMI 的内容来解决该问题,那么您最好的方法是启动一个实例并拍摄其正在运行的 EBS 的快照(然后您可以下载该快照)。如果您不使用 EBS 支持的实例,则可以使用 Amazon 工具从当前实例创建 AMI。
Is there a real problem that you're trying to solve?
Because if there is, and you need the contents of a particular AMI to solve it, then your best approach is going to be starting an instance and taking a snapshot of its running EBS (which you can then download). If you're not using an EBS-backed instance, then you can use the Amazon tools to create an AMI from your current instance.