| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
With EC2 AMI copy, you can easily copy the Amazon Machine Images (AMIs) you own to other AWS regions and scale your applications to take advantage of AWS's geographically diverse regions.
EC2 AMI copy provides the following benefits:
Consistent global deployment: You can copy an AMI from one region to another, enabling you to launch consistent instances based from the same AMI into different regions.
Scalability: You can more easily design and build world-scale applications that meet the needs of your users, regardless of their location.
Performance: You can increase performance by distributing your application, as well as locating critical components of your application in closer proximity to your users. You can also take advantage of region-specific features, such as instance types or other AWS services.
High availability: You can design and deploy applications across AWS regions, to increase availability.
EC2 AMI copy enables you to copy an AMI to as many regions as you like from the AWS Management Console, the Amazon EC2 CLI, or the Amazon EC2 API. EC2 AMI copy is available for Amazon EBS-backed AMIs as well as instance-store-backed AMIs, and is operating-system-agnostic.
Important
Prior to copying an AMI, you must ensure that the contents of the source AMI are updated to support running in a different region. For example, you should update any database connection strings or similar application configuration data to point to the appropriate resources. Otherwise, instances launched from the new AMI in the destination region may still use the resources from the source region, which can impact performance and cost.
Each copy of an AMI results in a new AMI with its own unique AMI ID. Any changes made to the source AMI during or after a copy are not propagated to the new AMI as part of the AMI copy process; you must recopy the AMI to the destination regions to copy the changes made to the source AMI.
Note
Permissions and user-defined tags applied to the source AMI are not copied to the new AMIs as part of the AMI copy process. After the copy is complete, you may apply any permissions and user-defined tags to the new AMIs.
You can copy an EC2-Classic, default VPC AMI using the AWS Management Console, the EC2 CLI tools, or the EC2 API.
To copy an AMI using the AWS Management Console
You can create a copy of an Amazon EC2 AMI using the console. When you copy an AMI using the console, a copy of the source AMI is "pushed" to the destination region.
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
In the navigation pane, click AMIs.
Select the AMI to copy, click Actions and select Copy.
In the AMI Copy page, choose the following:
Destination region: Select the region to which you want to copy the AMI.
Name: Type a name for the new AMI.
Description: By default, the description includes information about the source AMI so that you can identify a copy from the original. You can change this description as necessary.
Click Copy.
The Copy AMI confirmation page appears, notifying you that the copy operation has been initiated. The new AMI ID is provided. Click Done.
To view the progress of the copy operation later, switch the Amazon EC2 console to the
destination region, and then refresh the AMI pane. The copy operation is
complete when the new AMI's status displays
available.
To copy an AMI using the CLI
You can copy an AMI using the CLI by completing the instructions in the ec2-copy-image topic in the Amazon Elastic Compute Cloud Command Line Reference. This action initiates the copy operation and registers the new AMI in the destination region.
To copy an AMI using the API
You can create a copy of an Amazon EC2 AMI using the API by completing the steps in the CopyImage topic in the Amazon Elastic Compute Cloud API Reference. This action connects to the destination region and "pulls" copies of the source AMI to that destination region.
You can stop the copy operation of an EC2-Classic, default VPC AMI using the AWS Management Console, the CLI, or the API.
To stop the AMI copy operation using the AWS Management Console
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
Select the destination region from the region selector.
In the navigation pane, click AMIs.
Select the AMI you want to stop copying, click Actions and select Deregister.
When asked for confirmation, click Continue.
To stop the AMI copy operation using the CLI
You can stop the AMI copy operation using the CLI by completing the instructions in the ec2-deregister topic in the Amazon Elastic Compute Cloud Command Line Reference. This action stops the copy operation and deregisters the new AMI in the destination region.
To stop the AMI copy operation using the API
You can stop the AMI copy operation using the API by completing the steps in the DeregisterImage topic in the Amazon Elastic Compute Cloud Command Line Reference. This action stops the copy operation and deregisters the new AMI in the destination region.
This section addresses frequently asked questions about EC2 AMI copy.
Q: What kind of AMIs can I copy with EC2 AMI copy?
You can only copy AMIs that you own. You cannot copy Amazon or community AMIs.
You can only copy AMIs that you own. You cannot copy Amazon, community, or Marketplace AMIs.
Q: Who can copy AMIs?
Any AWS customer who has access to the AWS Management Console or APIs and CLIs can copy an AMI. IAM users who are authorized users or owners of an AMI can also copy AMIs.
Q: Will permissions and tags from the source AMI be copied to the destination AMI?
No. Permissions and user-defined tags are not copied. Permissions and user-defined tags that have been granted to the source AMI must be created again on the destination AMI after the copy is complete.
For more information about how to add permissions, go to Setting Launch Permissions on an Amazon Machine Image in the AWS Toolkit for Visual Studio User Guide.
For more information about how to add user-defined tags, see Tagging Your Amazon EC2 Resources.
Q: How do I know when the copy operation is complete?
After the new AMI in the destination region displays a status of available, the copy operation is complete and the AMI is ready to be used.
Q: After I have copied an AMIs, will subsequent updates to the source AMI be propagated to my copied AMIs in the destination region?
No. EC2 AMI copy results in two distinct AMIs, the original AMI in the source region and the new AMI in the destination region. Any subsequent changes to the source AMI are independent of the copied AMIs in the destination region, and vice versa. If you make changes to the source AMIs and want those changes to be reflected in the copied AMIs in the destination region, you must recopy the AMI to the destination regions.
Q: After an AMI has been copied, can I make changes to it independently of the original (source) AMI?
Yes. The new AMI is fully independent of the source AMI, and it can be modified without affecting the source AMI. The reverse is also true: the source AMI can be modified without affecting the new AMI.
Q: Are new AMIs linked back to the original (source) AMI?
No. There is no link between the source AMI and the new AMI.
Q: Which AKI and ARI will the new AMI use?
EC2 AMI copy tries to find matching AKIs and ARIs for the new AMI in the selected destination region. If no suitable AKI or ARI can be found, then the AMI is not copied. If you are using the AKIs and ARIs recommended by Amazon, the copy operation registers the AMI with the appropriate AKI and ARI in the destination region.
Q: What does the error message "Failed to find matching AKI/ARI" mean?
If you get an error message "Failed to find matching AKI/ARI", that means that the destination region does not contain an equivalent AKI/ARI to those specified in the AMI. If your AMI is using a PV-GRUB AKI, then you can update the AMI to leverage the latest version of PV-GRUB. For more information on PV-GRUB and AKIs, see Enabling Your Own Linux Kernels.
Q: Are copy requests submitted to the source or the destination region endpoint?
Calls to request a copy of an AMI from the CLI or API are submitted to and initiated from the destination region endpoint.
Q: What types of AMIs and operating systems does EC2 AMI copy support?
EC2 AMI copy works with all AMIs and operating systems supported by Amazon EC2.
How much does EC2 AMI copy cost?
There are no charges for EC2 AMI copy. However, standard storage and data transfer rates apply.
Q: Will EC2 AMI copy cost more for Windows AMIs?
No. Copying Windows AMIs is free, just like copying Linux AMIs. Currently, differential rates only apply to running instances and reflect the increased cost of running a Windows license. A Windows AMI that is the same size as a Linux AMI and that uses the same backing store (EBS or instance) will result in the same storage and bandwidth usage charges after the copy is complete.