i want to move ami

0

HI team, i want to move ami to s3 bucket then is it possible to delete ami in ami creation if i want to launch ami in future whether is it possible to relaunch the ami from s3 bucket pls suggest me on this

질문됨 2달 전49회 조회
4개 답변
1
profile picture
전문가
답변함 2달 전
0

i Have lot of ami's in my aws ec2 ami portal i want to move some of the ami to s3 bucket after moving to s3 bucket if i delete ami snapshot if it is possible to retrieve the ami through bucket

답변함 2달 전
0

Please note that you can store an Amazon Machine Image (AMI) in an Amazon S3 bucket, and then restore it from the S3 bucket. The supported APIs for storing and restoring an AMI using S3 are CreateStoreImageTask, DescribeStoreImageTasks, and CreateRestoreImageTask.

Currently the store and restore APIs are only supported by using the AWS Command Line Interface, AWS SDKs, and Amazon EC2 API. You can’t store and restore an AMI using the Amazon EC2 console. Hence, please make sure that you have AWS CLI installed and updated to the latest version.

You can refer the section "Store an AMI in an S3 bucket" in the below documentation:

[+] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#how-it-works

The limitations and IAM permissions required are also provided in the documentation. For your convenience, please refer the steps below:

  1. Store an AMI in an S3 bucket: you have to specify the ID of the AMI and the name of the S3 bucket in which to store the AMI:
aws ec2 create-store-image-task \
    --image-id ami-1234567890abcdef0 \
    --bucket myamibucket
  1. Describe the progress of an AMI store task:
aws ec2 describe-store-image-tasks
  1. Restore an AMI from an S3 bucket: you have to specify the object key of the AMI and the name of the S3 bucket to which the AMI was copied
aws ec2 create-restore-image-task \
    --object-key ami-1234567890abcdef0.bin \
    --bucket myamibucket \
    --name "New AMI Name"

The CreateStoreImageTask API stores an AMI as a single object in an S3 bucket.

The API creates a task that reads all of the data from the AMI and its snapshots, and then uses an S3 multipart upload to store the data in an S3 object. The API takes all of the components of the AMI, including most of the non-Region-specific AMI metadata, and all the EBS snapshots contained in the AMI, and packs them into a single object in S3. The data is compressed as part of the upload process to reduce the amount of space used in S3, so the object in S3 might be smaller than the sum of the sizes of the snapshots in the AMI.

The object in S3 has the same ID as the AMI, but with a .bin extension. The time it takes to complete the task depends on the size of the AMI.

AWS
답변함 한 달 전
-1

AMIs are stored in a S3 bucket you cannot see so what you are trying to do is not possible.

답변함 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠