AWS

How to Copy an EBS Snapshop to a Different Availability Zone

EBS Volumes are created inside of a specific Availability Zone [AZ]. It isn’t possible to move an EBS Volume from one AZ to another directly.
September 23, 2023

Understanding the Limitation of EBS Volumes

EBS Volumes are created inside of a specific Availability Zone [AZ]. It isn’t possible to move an EBS Volume from one AZ to another directly. An EBS Snapshot will create a backup of an EBS Volume at the time of inception.

An EBS Snapshot can be used to create an EBS Volume in a different Availability Zone.

Prerequisites

To follow along with this tutorial, you will need:

EBS Snapshot in One Availability Zone

Initial State

  • In Figure 3.1, we’re looking at the EBS Snapshots page in the us-east-2 region - we can clearly see that we have one EBS Snapshot with ID “snap-09f5b3ff7eb4d7d26.”
  • In Figure 3.2, we’re looking at the EBS Snapshots page in the us-east-1 region - we can see that there are no EBS Snapshots in this region.
Figure 3.1 - EBS Snapshot to Different Availability Zone | An example of a running snapshot that's currently provisioned on US East (Ohio) us-east-2 with ID “snap-09f5b3ff7eb4d7d26”
Figure 3.1 - EBS Snapshot to Different Availability Zone | An example of a running snapshot that's currently provisioned on US East (Ohio) us-east-2 with ID “snap-09f5b3ff7eb4d7d26”
Figure 3.2 - EBS Snapshot to Different Availability Zone | No EBS Snapshots” in us-east-2 region
Figure 3.2 - EBS Snapshot to Different Availability Zone | No EBS Snapshots” in us-east-2 region

Creating a Copy of an EBS Snapshot Into a Different Availability Zone

Step 1 - Select an EBS Snapshot & Copy

1.1 - From the list of EBS Snapshots, choose the desired snapshot, click on “✔️.”

1.2 - From the top menu, click on “Actions.”

1.3 - From the drop-down menu, click on “Copy snapshot.”

Figure 4.1 - EBS Snapshot to Different Availability Zone | Copying an EBS Snapshot
Figure 4.1 - EBS Snapshot to Different Availability Zone | Copying an EBS Snapshot

You will be brought to a new page to confirm the parameters of the new snapshot.

Step 2 - Configure Snapshot & Confirm Copy

2.1 - From the Settings, choose the desired Availability Zone, for this tutorial, we’re using us-east-1.

2.2 - On the bottom of the page, click on “Copy snapshot.”

Figure 4.2 - EBS Snapshot to Different Availability Zone | Specifying Destination Region for EBS Snapshot
Figure 4.2 - EBS Snapshot to Different Availability Zone | Specifying Destination Region for EBS Snapshot

You’ll receive a confirmation that a snapshot has been created. If you navigate to the target region (In this case us-east-1) you’ll see that there’s a new entry with the snapshot we just copied.

Note: the copy of an EBS Snapshot will specify the snapshot it has copied by default within the description. In our case, it’s the ID “snap-09f5b3ff7eb4d7d26” as shown below.

Figure 4.3 - EBS Snapshot to Different Availability Zone | Copied EBS Snapshot in a new Region

Frequently Asked Questions

How do I copy EBS snapshot from one AWS account to another?

You may find yourself with the task of moving an EBS snapshot from one AWS account to another. Here's a brief summary of steps to take to get that done:

Step 1: Share the source account snapshot. In the source account console, navigate to the snapshot and grant read access to the target account ID under "Modify Snapshot Permissions."

Step 2: Handle encryption. If your snapshot uses a Customer Managed Key (CMK), share the CMK with the target account. They then create a copy of the shared snapshot, encrypting it with the shared CMK or a different one.

Step 3: Initiate the copy. Within the target account, locate the shared snapshot and use the CLI or console to initiate a copy. Remember to choose the appropriate encryption key, either the shared CMK or a target-specific one.

Step 4: Create a new volume. Once the copy finishes, leverage the copied snapshot ID to create a new EBS volume in the target account.

So in short, to copy an EBS snapshot from one AWS account to another share the source snapshot, handle encryption (if applicable), initiate a copy in the target account with the right key, and create a new volume. Remember secure CMKs and IAM permissions for a seamless migration!

Can I download EBS snapshot?

Directly downloading EBS snapshots to your local machine isn't possible due to security and formatting constraints. You can use one of the AWS services to retrieve the data from EBS by restoring the snapshot, but there's no way to do that on your own machine.

How do I copy EBS snapshots to S3?

Copying EBS snapshots to S3 isn't possible without a workaround. Here are a few options to consider:

1. AWS CLI Command:

  • Use the aws ec2 copy-snapshot command to directly copy the snapshot to an S3 bucket. This eliminates the need for an EC2 instance and offers speed and security.

2. AWS Management Console:

  • Navigate to the snapshot in the EC2 console and select "Copy snapshot." Specify the destination S3 bucket and configure encryption settings.

3. AWS Data Lifecycle Manager (DLM):

  • Create DLM policies to automatically copy snapshots to S3 buckets based on defined rules and schedules. This automates the process and offers flexibility for long-term storage and archiving.

4. AWS Backup:

  • Use AWS Backup to centrally manage snapshot backups and leverage its integration with S3 storage. This solution offers comprehensive lifecycle management and cost-effective options.

5. Third-party Tools:

  • While some third-party tools claim to download snapshots to local machines, proceed with caution due to potential security and compliance concerns. These tools might not adhere to AWS best practices and could introduce vulnerabilities.

Directly copy EBS snapshots to S3 using the AWS CLI, console, DLM, or Backup. These native tools offer secure, efficient, and compliant solutions for your data transfer needs. Remember, prioritize security when choosing your method.

Conclusion on Copying EBS Snapshots between Availability Zones

In this tutorial we’ve covered why you might want to copy an EBS Snapshot from one Availability Zone to another. We’ve also covered the exact steps to take and showcased a move from us-east-2 to us-east-1.