ec2-migrate-image
Syntax
ec2-migrate-image
-K private_key
-C cert
-U url
-o access_key_id
-w secret_access_key
--bucket source_s3_bucket
--destination-bucket destination_s3_bucket
--manifest manifest_path
--location {US | EU}
--ec2cert ec2_cert_path
[--kernel kernel-id
]
[--ramdisk ramdisk_id
]
{--no-mapping}
--region mapping_region_name
Description
Copy a bundled AMI from one region to another. For information on regions, see
Note | |
---|---|
After copying a bundled AMI to a new region, make sure to register it as a new AMI.
During migration, Amazon EC2 replaces the kernel and RAM disk in the manifest file with a kernel
and RAM disk designed for the destination region. Unless the --no-mapping parameter is given,
This tool replaces ec2-migrate-bundle. |
Options
Option | Description | Required |
---|---|---|
|
The path to the user's PEM-encoded RSA key file. Example: Default: Uses |
No |
|
The user's PEM encoded RSA public key certificate file. Example: Default: Uses |
No |
|
Specifies the URL to use as the web service URL. Example: Default: |
No |
|
Access key ID of the bucket owner. Example: |
Yes |
|
Secret access key of the bucket owner. Example: |
Yes |
|
The source Amazon S3 bucket where the AMI is located, followed by an optional '/'-delimited path prefix. Default: None Example: |
Yes |
|
The destination Amazon S3 bucket, followed by an optional '/'-delimited path prefix. If the destination bucket does not exist, it is created. Default: None Example: |
Yes |
|
The location of the Amazon S3 source manifest. Default: None Example: |
Yes |
|
The location of the destination Amazon S3 bucket. If the bucket exists and the location is specified, the tool exits with an error. if the specified location does not match the actual location. If the bucket exists and no location is specified, the tool uses the bucket's location. If the bucket does not exist and the location is specified, the tool creates the bucket in the specified location. If the bucket does not exist and location is not specified, the tool creates the bucket without a location constraint (in the US). Default: None Example: |
No |
|
The access control list policy of the bundled image. Valid Values: Default: Example: |
No |
|
The ID of the kernel to select. For information on finding available kernel IDs, see ec2-describe-images. Example: |
No |
|
The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk. To find kernel requirements, go to the Resource Center and search for the kernel ID. Example: |
No |
|
Disables automatic mapping of kernels and RAM disks. Example: |
No |
|
Region to look up in the mapping file. If no region is specified, Amazon EC2 attempts to determine the region from the location of the Amazon S3 bucket. Example: |
No |
Output
Status messages describing the stages and status of the migration process.
Example
This example copies the AMI specified in the my-ami.manifest.xml
manifest from the US to the EU.
$
ec2-migrate-image --cert cert-THUMBPRINT.pem --privatekey pk-THUMBPRINT.pem -o 157SZTMZQT516NAZ7CR2 -w eW91dHViZS5jb20vd2F0Y2g/dj1SU3NKMTlzeTNKSQ== --bucket my-us-bucket --destination-bucket my-eu-bucket --manifest my-ami.manifest.xml --location EU
Downloading manifest my-ami.manifest.xml from my-us-bucket to /tmp/ami-migration-my-ami.manifest.xml/my-ami.manifest.xml ... Copying 'my-ami.part.00'... Copying 'my-ami.part.01'... Copying 'my-ami.part.02'... Copying 'my-ami.part.03'... Copying 'my-ami.part.04'... Copying 'my-ami.part.05'... Copying 'my-ami.part.06'... Copying 'my-ami.part.07'... Copying 'my-ami.part.08'... Copying 'my-ami.part.09'... Copying 'my-ami.part.10'... Your new bundle is in S3 at the following location: my-eu-bucket/my-ami.manifest.xml