Amazon EC2 AMI Lifecycle (Part 5)

 





Copy an Amazon EC2 AMI

When it's necessary to maintain a uniform configuration for Amazon EC2 instances across different Regions, you can utilize a single Amazon Machine Image (AMI) as your base template for launching all instances. However, it's important to note that AMIs are specific to each Region, if you want to launch an instance in a particular AWS Region, the AMI must reside within that Region. Consequently, to employ the same AMI across multiple Regions, you need to copy it from the original Region to each desired target Region.

The method you use to copy an AMI depends on whether you're copying across Regions within the same partition or across different partitions:

  • Cross-Region copying- Copy AMIs across Regions within the same partition, for example, across the Regions within the commercial partition.

  • Cross-partition copying- Copy AMIs from one partition to another partition, for example, from the commercial partition to the AWS GovCloud (US) partition.

  • Cross-account copying- Create a copy of an AMI that another AWS account has your AWS account.

The time taken to complete the copy operation for cross-Region and cross-account AMI copying is on a best-effort basis. If you need control over the completion time, you can specify a completion window ranging from 15 minutes to 48 hours, ensuring your AMI is copied within your required timeframe. Additional charges apply for time-based AMI copy operations.

Considerations

  • Permission to copy AMIs- You can use IAM policies to grant or deny users permission to copy AMIs. Starting October 28, 2024, you can specify resource-level permissions for the CopyImage action on the source AMI. Resource-level permissions for the target AMI are available as before.

  • Launch permissions and Amazon S3 bucket permissions- AWS does not copy launch permissions or Amazon S3 bucket permissions from the source AMI to the new AMI. After the copy operation is complete, you can apply launch permissions and Amazon S3 bucket permissions to the new AMI.

  • Tags-You can only copy user-defined AMI tags that you attached to the source AMI. System tags (prefixed with aws:) and user-defined tags that are attached by other AWS accounts will not be copied. When copying an AMI, you can attach new tags to the target AMI and its backing snapshots.

  • Quotas for time-based AMI copies- After you reach your cumulative snapshot copy throughput quota, subsequent time-based AMI copy requests fail.

Costs

Copying an AMI incurs no fees if a completion time is not indicated. However, extra charges will be applied for AMI copy processes that are based on time.

Typical storage and data transfer fees will be applied. Should you create a copy of an EBS-backed AMI, you will be billed for the storage of any new EBS snapshots.

Conclusion

The method of copying AMI is discussed. 






















Comments

Popular posts from this blog

Deployment (Part 3)

Deployment (Part 1)

Deployment (Part 2)