I've created a snapshot of EC2 instance via:

aws ec2 create-snapshot --volume-id vol-xyz

In aws ec2 create-snapshot help we can read:

Creates a snapshot of an EBS volume and stores it in Amazon S3.

Although I cannot see in which bucket it has been imported.

In addition, there is a command aws ec2 import-snapshot which imports a disk from the S3 bucket.

So basically I'm looking for some way of exporting EC2 snapshot into S3 bucket where I can see the image file in order to download it.

How I can do it?

  • 1
    Export/import works with S3 as backend storage to allow cross region move. that doesn't mean it works with one of your bucket backed by S3 also. That just count as S3 storage used by your account, but I don't know of any way to access the snapshot 'files'
    – Tensibai
    Feb 23 '18 at 22:06

EBS Snapshots aren't really disk image files. They're logical containers of pointers to chunks of compressed and deduplicated backup data that EBS stores in S3 when you create snapshots -- but these are stored in buckets that EBS owns and controls.

They are user-accessible via only one mechanism -- creating a new EBS volume from the snapshot. When you do this, the new volume is linked back to its source snapshot and EBS starts loading the data onto the new volume in the background, from the snapshot storage in S3. If you access a part of the volume that EBS hasn't yet restored, it immediately goes and fetches the chunks and puts them on the volume.

To create a disk image file of a snapshot, you create a new volume from the snapshot, attach it to a running instance without mounting it, and then use the same tools you would use for a standard hard drive -- tools like dd to read raw blocks from the snapshot, and write them to a file, which you can then download from the instance, e.g. using scp.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.