如何将 AMI 文件存储到 S3 存储桶?
How to store AMI file to S3 bucket?
我在 AWS 上有一个 Ubuntu ec2 实例。我以 AMI 为例。
我想将 AMI 存储到 S3 存储桶。有什么办法吗?还有从 S3 存储桶中导出 AMI 的方法吗?
更新:此功能现已可用
来自Store and restore an AMI using S3 - Amazon Elastic Compute Cloud:
You can store an Amazon Machine Image (AMI) in an Amazon S3 bucket, copy the AMI to another S3 bucket, and then restore it from the S3 bucket. By storing and restoring an AMI using S3 buckets, you can copy AMIs from one AWS partition to another, for example, from the main commercial partition to the AWS GovCloud (US) partition. You can also make archival copies of AMIs by storing them in an S3 bucket.
--- 旧答案 ---
无法导出 AMI。
Amazon 系统映像 (AMI) 是 Elastic Block Store (EBS) 卷的副本。 AMI 存储在 Amazon S3 中,但无法通过 S3 服务访问。将其视为存储在 AWS 自己的 S3 存储桶中,而不是您的。
如果您希望导出磁盘映像,请使用标准磁盘实用程序将磁盘复制为 ISO 格式,然后可以将其复制并装载到其他 VM 上。
谢谢约翰。
大家好,我也和 AWS 支持人员聊过。供您参考,
10:15:45 AM Myself: Well i have some doubts. I will ask and just clear in me on that.
10:15:49 AM AWS support: Sure
10:15:59 AM AWS support: I'll be happy to do so
10:16:25 AM Myself: Is there any option to sore AMI in S3 bucket.
10:16:46 AM AWS support: No, this is not possible
10:17:05 AM AWS support: AMI data is a simple configuration file
10:17:11 AM AWS support: This is backed by S3
10:17:18 AM AWS support: But not stored in an S3 bucket
10:17:27 AM AWS support: The exact same is true for Snapshots
10:17:45 AM AWS support: It is stored and backed by S3- but not something that can be placed in one of your buckets
10:17:59 AM Myself: is it possible to view that in s3?
10:18:51 AM AWS support: No, this is not something that is visible in S3, I am sorry to say
10:19:57 AM Myself: OK. I need to download the AMI . what can i do?
10:20:19 AM AWS support: AMI data is not something that is downloadable
10:20:35 AM AWS support: Are you seeking to Download your whole instance?
10:20:46 AM AWS support: Or download a complete volume?
10:21:07 AM AWS support: If you originally imported your instance from a VM, you can Export the VM 10:21:29 AM AWS support: But its an EC2 instance that was created in EC2, you can not- I am really sorry to say
10:22:02 AM Myself: Okay fine.
我 运行 遇到了同样的问题,令我高兴的是,AWS 已经对此进行了创新。
您现在可以在 S3 中存储和恢复您的 AMI。
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#store-ami
--
更新:
AWS CLI 的版本很重要
我在 AWS 上有一个 Ubuntu ec2 实例。我以 AMI 为例。 我想将 AMI 存储到 S3 存储桶。有什么办法吗?还有从 S3 存储桶中导出 AMI 的方法吗?
更新:此功能现已可用
来自Store and restore an AMI using S3 - Amazon Elastic Compute Cloud:
You can store an Amazon Machine Image (AMI) in an Amazon S3 bucket, copy the AMI to another S3 bucket, and then restore it from the S3 bucket. By storing and restoring an AMI using S3 buckets, you can copy AMIs from one AWS partition to another, for example, from the main commercial partition to the AWS GovCloud (US) partition. You can also make archival copies of AMIs by storing them in an S3 bucket.
--- 旧答案 ---
无法导出 AMI。
Amazon 系统映像 (AMI) 是 Elastic Block Store (EBS) 卷的副本。 AMI 存储在 Amazon S3 中,但无法通过 S3 服务访问。将其视为存储在 AWS 自己的 S3 存储桶中,而不是您的。
如果您希望导出磁盘映像,请使用标准磁盘实用程序将磁盘复制为 ISO 格式,然后可以将其复制并装载到其他 VM 上。
谢谢约翰。
大家好,我也和 AWS 支持人员聊过。供您参考,
10:15:45 AM Myself: Well i have some doubts. I will ask and just clear in me on that.
10:15:49 AM AWS support: Sure
10:15:59 AM AWS support: I'll be happy to do so
10:16:25 AM Myself: Is there any option to sore AMI in S3 bucket.
10:16:46 AM AWS support: No, this is not possible
10:17:05 AM AWS support: AMI data is a simple configuration file
10:17:11 AM AWS support: This is backed by S3
10:17:18 AM AWS support: But not stored in an S3 bucket
10:17:27 AM AWS support: The exact same is true for Snapshots
10:17:45 AM AWS support: It is stored and backed by S3- but not something that can be placed in one of your buckets
10:17:59 AM Myself: is it possible to view that in s3?
10:18:51 AM AWS support: No, this is not something that is visible in S3, I am sorry to say
10:19:57 AM Myself: OK. I need to download the AMI . what can i do?
10:20:19 AM AWS support: AMI data is not something that is downloadable
10:20:35 AM AWS support: Are you seeking to Download your whole instance?
10:20:46 AM AWS support: Or download a complete volume?
10:21:07 AM AWS support: If you originally imported your instance from a VM, you can Export the VM 10:21:29 AM AWS support: But its an EC2 instance that was created in EC2, you can not- I am really sorry to say
10:22:02 AM Myself: Okay fine.
我 运行 遇到了同样的问题,令我高兴的是,AWS 已经对此进行了创新。
您现在可以在 S3 中存储和恢复您的 AMI。 https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#store-ami
-- 更新: AWS CLI 的版本很重要