EC2 Snapshots

Elastic Block Store (EBS) volumes provide persistent block storage for use with EC2 instances. This block storage can be used for both structured and unstructured data. In order to avoid data loss due to component failure, the EBS volumes are automatically replicated over numerous servers within an Availability Zone.  

An EBS volume can be made into a snapshot. A snapshot is a feature provided to create backups of EBS volumes. A snapshot takes a copy of the EBS volume in Amazon S3, where it is redundantly kept across many Availability Zones. The initial snapshot contains a complete copy of the volume, but subsequent snapshots only save incremental block-level changes. Since there is no data duplication, this reduces the amount of time needed to create the snapshot and reduces storage costs. 

EBS Snapshots can be created and managed via the AWS Management Console, AWS Command Line Interface (CLI), or AWS SDKs. Additionally, Amazon EBS Snapshots interact with Amazon Data Lifecycle Manager (DLM), which enables you to set up rules for automating the maintenance of snapshot lifecycles. 

Create a Snapshot

From the Management Console, complete the following steps: 

  1. Navigate: Console Home –> EC2 –> Elastic Block Store –> Snapshots. 
  2. Click on the Create snapshot button. 
  3. Under Snapshot settings, choose Volume for Resource type if you want to create a snapshot from a specific volume. 
  4. For Volume ID, select the volume from which to create the snapshot. 
  5. The encryption status of the specified volume is displayed in the Encryption field. If the chosen volume is encrypted, the snapshot is also encrypted automatically with the same KMS key. If the chosen volume is not encrypted, neither is the snapshot. You can add an optional description of the snapshot. You can also assign optional tags. 
  6. Finally, click on the Create snapshot button. 

Copy a Snapshot

You can copy a snapshot from one AWS Region to another or within the same region once it has finished copying to Amazon S3 i.e., when the snapshot status displays completed. 

From the Management Console, complete the following steps: 

  1. Navigate: Console Home –> EC2 –> Elastic Block Store –> Snapshots. 
  2. Select the snapshot you wish to copy, and then under Actions select, Copy snapshot. 
  3. You can either write your own description or use the default description provided. 
  4. Select the Destination Region in which you want to create a snapshot copy. 
  5. Indicate the encryption status for the snapshot copy. Note that the snapshot copy is automatically encrypted if the source snapshot is encrypted or if encryption is set for your account by default. You cannot change the snapshot copy’s encryption status. In the case where the source snapshot is unencrypted and your account is not set up for encryption by default, encryption is completely optional. 
  6. Finally, click on the Copy snapshot button. 

Share a Snapshot

Snapshots can be shared either publicly with all other AWS accounts or privately with a list of specific AWS accounts. Your initial snapshot will be untouched and can still be used by authorized users to build their own EBS volumes. 

From the Management Console, complete the following steps: 

  1. Navigate: Console Home –> EC2 –> Elastic Block Store –> Snapshots. 
  2. Select the snapshot you wish to share, and then under Actions select, Modify permissions. 
  3. In order to share the snapshot publicly with all AWS accounts, select Public. If you wish to share the snapshot privately with specific AWS accounts, select Private. After that, select Add account in the Sharing accounts section and provide the 12-digit account ID of the account you want to share with. 
  4. Finally, hit Save changes. 

Delete a Snapshot

Deleting a snapshot has no effect on the volume and a deleted volume has no impact on any snapshots that were created from it. 

From the Management Console, complete the following steps: 

  1. Navigate: Console Home –> EC2 –> Elastic Block Store –> Snapshots. 
  2. Select the snapshot you wish to delete, and then under Actions select, Delete snapshot. 
  3. Finally, click on the Delete button. 

Recover snapshots from the Recycle Bin 

You can recover unintentionally deleted Amazon EBS snapshots using the data recovery tool called Recycle Bin. When you delete resources, they are temporarily stored in the Recycle Bin before being permanently erased. Prior to the end of its retention period, you can always restore a resource from the Recycle Bin. The resource is removed from the Recycle Bin after being restored, and you can use it the same way you would any other resource of that type in your account. If the retention term expires without the resource being recovered, it is permanently removed from the Recycle Bin and is no longer retrievable. 

Complete the following steps: 

  1. Open the Recycle Bin console at https://console.aws.amazon.com/rbin/home/
  2. Create a retention rule. 
  3. Select EBS Snapshots under Resource type and check the box to Apply to all resources. 
  4. Set the number of days under Retention period and click on the Create retention rule button. 
  5. After you delete snapshots in the EC2 section, you can go to the Resources section which is on the navigation panel of the Recycle Bin. All the snapshots that are currently in the Recycle Bin will be listed on the grid.  
  6. Choose Recover after selecting the snapshot you want to restore. 

EBS Snapshots Pricing

Since the EBS snapshots are stored incrementally, if you have a volume that’s storing 50GB data, you are charged for the entire 50GB data for the first snapshot. Subsequently, if you have 60GB data at the time of your next snapshot, you are only billed for the additional 10GB data. As of this writing, the Standard tier pricing for EBS Snapshots Storage is $0.05/GB-month.