Create an EBS volume from an imported snapshot
You can create EBS volumes from an EBS snapshot. You can attach an EBS volume to an EC2 instance.
- Amazon CLI
-
To create a volume and attach it to an EC2 instance
-
Use the describe-import-snapshot-tasks command to determine the ID of the snapshot that was created by the import task.
-
Use the following create-volume command to create a volume from the snapshot. You must select the Availability Zone of the instance to which you'll attach the volume.
aws ec2 create-volume \ --availability-zone
us-east-1a
\ --snapshot-idsnap-1234567890abcdef0
The following is example output.
{ "AvailabilityZone": "us-east-1a", "VolumeId": "vol-1234567890abcdef0", "State": "creating", "SnapshotId": "snap-1234567890abcdef0" }
-
Use the following attach-volume command to attach the EBS volume that you created in the previous step to one of your existing instances.
aws ec2 attach-volume \ --volume-id
vol-1234567890abcdef0
\ --instance-idi-1234567890abcdef0
\ --device/dev/sdf
The following is example output.
{ "AttachTime": "YYYY-MM-DDTHH:MM:SS.000Z", "InstanceId": "i-1234567890abcdef0", "VolumeId": "vol-1234567890abcdef0", "State": "attaching", "Device": "/dev/sdf" }
-
Mount the attached volume. For more information, see the documentation for the operating system for your instance.
-
- PowerShell
-
To create a volume and attach it to an EC2 instance
-
Use the Get-EC2ImportSnapshotTask cmdlet to determine the ID of the snapshot that was created by the import task.
-
Use the New-EC2Volume cmdlet to create a volume from the snapshot. You must select the Availability Zone of the instance to which you'll attach the volume.
New-EC2Volume ` -AvailabilityZone
us-east-1a
` -SnapshotIdsnap-1234567890abcdef0
The following is example output.
Attachments : {} AvailabilityZone : us-east-1a CreateTime : 7/15/2025 3:37:56 PM Encrypted : False FastRestored : False Iops : 3000 KmsKeyId : MultiAttachEnabled : False Operator : OutpostArn : Size : 41 SnapshotId : snap-1234567890abcdef0 SseType : State : creating Tags : {} Throughput : 125 VolumeId : vol-1234567890abcdef0 VolumeType : gp3
-
Use the Add-EC2Volume cmdlet
Add-EC2Volume ` -VolumeId
vol-1234567890abcdef0
` -InstanceIdi-1234567890abcdef0
` -Devicexvdb
The following is example output.
AssociatedResource : AttachTime : 7/15/2025 3:47:20 PM DeleteOnTermination : False Device : xvdb InstanceId : i-1234567890abcdef0 InstanceOwningService : State : attaching VolumeId : vol-1234567890abcdef0
-
Mount the attached volume. For more information, see the documentation for the operating system for your instance.
-