AWS Elastic Block Storage (EBS) Snapshots

What is AWS EBS Snapshots?

Amazon Web Services (AWS) Elastic Block Store (EBS) provides block-level storage volumes that can be thought of as virtual hard drives attached to EC2 instances running on AWS.

An EBS snapshot is a point-in-time copy of your EBS volume.

EBS Snapshot Characteristics:

  1. Point-in-time Backup: When you create a snapshot, it represents the state of the volume at the moment the snapshot is initiated. Even if data continues to change on the volume, the snapshot only contains the data up to the point of the snapshot.

  2. Incremental: While the first snapshot captures all the data on the volume, subsequent snapshots only store the changes since the last snapshot. This means snapshots are incremental in nature and save storage space.

  3. Storage in Amazon S3: EBS snapshots are stored in Amazon S3, which provides durability by replicating the data across multiple geographically separated data centers.

  4. Restoration: You can create a new EBS volume from a snapshot, which can be useful for recovery purposes, creating clones for testing, or migrating data across regions or accounts.

  5. Cross-Region and Cross-Account Copy: Snapshots can be copied across AWS regions or between AWS accounts, aiding in disaster recovery strategies or data sharing.

  6. Lifecycle Management: AWS also offers the ability to automate the creation, retention, and deletion of EBS snapshots through services like AWS Data Lifecycle Manager (DLM).

  7. Costs: You pay for the storage used by EBS snapshots, but because snapshots are incremental, the cost is often less than the cost of the entire volume.

  8. Encryption: Snapshots can be encrypted, and if they're created from encrypted volumes, they are automatically encrypted.

Hands-on Lab Overview

In this hands-on lab, we will create a snapshot of the EBS volume with AWS Console, copy it into other regions, recreate another volume from an existing snapshot, and finally create a recycle bin that protects EBS snapshots and AMIs from accidental deletion.

Hands-on Lab

  • To create a snapshot:
  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose Snapshots, Create snapshot.

  3. For Resource type, choose Volume.

  4. For Volume ID, select the volume from which to create the snapshot.

    The Encryption field indicates the selected volume's encryption status. If the selected volume is encrypted, the snapshot is automatically encrypted using the same KMS key. If the selected volume is unencrypted, the snapshot is not encrypted.

  5. (Optional) For Description, enter a brief description for the snapshot.

  6. (Optional) To assign custom tags to the snapshot, in the Tags section, choose Add tag, and then enter the key-value pair. You can add up to 50 tags.

  7. Choose Create snapshot.

  • To copy a snapshot into other regions:

  • To recreate a volume from an existing snapshot:

  • To create a recycle bin that protects EBS snapshots and AMIs from accidental deletion:

References

  1. Amazon EBS snapshots

  2. Create Amazon EBS snapshots

  3. Delete an Amazon EBS snapshot