Amazon EC2 AMI Lifecycle (Part 8)
Store and restore an AMI
using S3
You have the ability to
save an Amazon Machine Image (AMI) in an Amazon S3 bucket, transfer the AMI to
a different S3 bucket, and subsequently restore it from there. By utilizing S3
buckets to store and retrieve an AMI, you can move AMIs between various AWS
partitions, such as from the primary commercial partition to the AWS GovCloud
(US) partition. Additionally, you can create backup copies of AMIs by keeping
them in an S3 bucket.
Use cases
Use the store and restore
APIs to do the following:
- Copy an AMI between AWS
partitions- By storing and restoring an AMI using S3
buckets, you can copy an AMI from one AWS partition to another, or from one AWS
Region to another.
- Make archival copies of
AMIs- You can make archival copies of AMIs by storing them
in an S3 bucket. The AMI is packed into a single object in S3, and all of the
AMI metadata (excluding sharing information) is preserved as part of the stored
AMI. The AMI data is compressed as part of the storage process. AMIs that
contain data that can easily be compressed will result in smaller objects in
S3. To reduce costs, you can use less expensive S3 storage tiers.
Limitations
To store an AMI, your AWS
account must either own the AMI and its snapshots, or the AMI and its snapshots
must be shared directly with your account. You can't store an AMI if it is only
shared.
- Only EBS-backed AMIs can be stored using these APIs.
- Paravirtual (PV) AMIs are not supported.
- The size of an AMI (before compression) that can be stored is limited to 5,000 GB.
- Quota on store image requests: 1,200 GB of storage work (snapshot data) in progress.
- Quota on restore image requests: 600 GB of restore work (snapshot data) in progress.
- For the duration of the store task, the snapshots must not be deleted and the IAM principal doing the store must have access to the snapshots, otherwise the store process will fail.
- You can’t create multiple copies of an AMI in the same S3 bucket.
- An AMI that is stored in an S3 bucket can’t be restored with its original AMI ID. You can mitigate this by using AMI aliasing.
- 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.
Costs
When you store and
restore AMIs using S3, you are charged for the services that are used by the
store and restore APIs, and for data transfer. The APIs use S3 and the EBS
Direct API (used internally by these APIs to access the snapshot data).
Comments
Post a Comment