Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Importing a disk as a snapshot using VM Import/Export

Focus mode
Importing a disk as a snapshot using VM Import/Export - VM Import/Export

VM Import/Export enables you to import your disks as Amazon EBS snapshots. After the snapshot is created, you can create an EBS volume from the snapshot, and then attach the volume to an EC2 instance.

An imported snapshot has an arbitrary volume ID that should not be used for any purpose.

Prerequisites for importing a snapshot

  • The following disk formats are supported: Virtual Hard Disk (VHD/VHDX), ESX Virtual Machine Disk (VMDK), and raw.

  • You must first upload your disks to Amazon S3.

  • If you have not already installed the AWS CLI on the computer you'll use to run the import commands, see the AWS Command Line Interface User Guide.

    Tip

    In supported AWS Regions, you can also use AWS CloudShell for a browser-based, pre-authenticated shell that launches directly from the AWS Management Console.

Start an import snapshot task

Use the following import-snapshot command to import a disk. You can specify the URL of the S3 bucket, or provide the S3 bucket name and key.

aws ec2 import-snapshot --description "My server VM" --disk-container "file://C:\import\containers.json"

The file containers.json is a JSON document that contains the required information.

{ "Description": "My server VMDK", "Format": "VMDK", "UserBucket": { "S3Bucket": "amzn-s3-demo-import-bucket", "S3Key": "vms/my-server-vm.vmdk" } }

The following is an example response:

{ "Description": "My server VM", "ImportTaskId": "import-snap-1234567890abcdef0", "SnapshotTaskDetail": { "Description": "My server VMDK", "DiskImageSize": "0.0", "Format": "VMDK", "Progress": "3", "Status": "active", "StatusMessage": "pending", "UserBucket": { "S3Bucket": "amzn-s3-demo-import-bucket", "S3Key": "vms/my-server-vm.vmdk" } } }

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.