EBS Snapshot – Can I Export an EBS Snapshot and Mount It to an On-Prem Server?

amazon-ebsamazon-web-servicesrhel7snapshot

I have a scenario where data is being aggregated in an EBS-backed AWS EC2 instance and, periodically, that instance is shut down and snapshot. Ideally, the snapshot of that volume needs to be exported and mounted on an airgapped server.

Supposing I have RHEL 7 running in both environments, is there a way to export the snapshot of an EBS volume and mount it to an on-prem server? If not, is there a pattern for Cloud -> on-prem migration?

It looks like AWS' Snowball is bi-directional. I'm not sure how that works in practice. Can I take an EBS volume snapshot, export it to a device, ship that device, and mount it locally?

Best Answer

Yes, you can export EBS volume to S3 bucket and download it. Check this page for more info.

Check ~/.aws/credentials for the profile name.

To export your instance, use the create-instance-export-task command. You must provide the information required to properly export the instance to the selected virtualization format. The exported file is saved in the S3 bucket that you specify.

aws ec2 create-instance-export-task --region your-region --profile your-profile-name --instance-id id --target-environment target_environment \
--export-to-s3-task DiskImageFormat=disk_image_format,ContainerFormat=ova,S3Bucket=bucket,S3Prefix=prefix
Related Topic