AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Initiates the copy of an AMI from the specified source Region to the current Region. You specify the destination Region by using its endpoint when making the request.

Copies of encrypted backing snapshots for the AMI are encrypted. Copies of unencrypted backing snapshots remain unencrypted, unless you set Encrypted during the copy operation. You cannot create an unencrypted copy of an encrypted backing snapshot.

For more information about the prerequisites and limits when copying an AMI, see Copying an AMI in the Amazon Elastic Compute Cloud User Guide.


For .NET Core this operation is only available in asynchronous form. Please refer to CopyImageAsync.

Namespace: Amazon.EC2
Assembly: AWSSDK.EC2.dll
Version: 3.x.y.z


public virtual CopyImageResponse CopyImage(
         CopyImageRequest request
Type: Amazon.EC2.Model.CopyImageRequest

Container for the necessary parameters to execute the CopyImage service method.

Return Value
The response from the CopyImage service method, as returned by EC2.


This example copies the specified AMI from the us-east-1 region to the current region.

To copy an AMI to another region

var response = client.CopyImage(new CopyImageRequest 
    Description = "",
    Name = "My server",
    SourceImageId = "ami-5731123e",
    SourceRegion = "us-east-1"

string imageId = response.ImageId;


Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

See Also