EBS Recycle Bin Demonstration


Amazon EBS Recycle Bin

The course is part of this learning path

EBS Recycle Bin Demonstration

This course explores the Amazon EBS recycle bin and how it can be used to recover deleted EBS snapshots.

Learning Objectives

  • Understanding the fundamentals of EBS recycle bin
  • Learn how you can use it to help you manage your EBS snapshots and recover from the accidental deletion of your EBS snapshots

Intended Audience

This course is intended for those who already have experience with Amazon EBS and are responsible for data and backup management of storage services within AWS.


As a prerequisite to this course, you should be familiar with the Elastic Block Store service and have basic experience of working with the service.


Welcome to this lecture, I figured that it would be easier to demonstrate what the EBS recycle bin is rather than explaining it over a series of slides and animations, and as a prerequisite of this course, you should already have some familiarity with EBS and snapshots in particular, so let’s take look.

So the EBS recycle bin is used to help you build some business continuity and DR elements into your EBS snapshots. Now, I am sure that we have all accidentally deleted an EBS snapshot at one point that we maybe shouldn’t have. If this has been you in the past, then your worries of doing it again are now over. 

So if we go to EC2 and then scroll down to the EBS section, and select Recycle bin here. 

The EBS recycle bin is used to recover deleted snapshots based on a retention period. So let’s take a look at it to see how we can configure and set this up. 

So as we can see, from the recycle bin screen we need to create a retention rule to allow us to protect our snapshots. And we have a series of configurable elements here so let’s run through each of them.

First of all, we can set an optional Retention rule name. I'm going to add in ‘EBS_Demo’ for this example. And then again we have a description box that we can add for the rule as well, again this is optional, so I’ll just leave that blank.

Next up we have the actual retention settings for the rule, so this is the area that will determine which EBS snapshots we want to protect and how long to keep the EBS snapshots for before they are permanently deleted. 

So firstly, I need to select the resource type, and currently, there is only one option here which is EBS snapshots so I’ll select that. 

Now underneath this, I have the option to apply any retention setting to all resources with a checkbox, however, if you want to be specific on which snapshots I want to retain then I can use resource tags to help me control which EBS snapshots will be retained by this rule. So if you are planning on using the EBS recycle bin then you might want to think of a strategy from a resource tagging perspective to help you quickly and easily highlight which EBS snapshots are business-critical that you want to retain if accidentally deleted. 

So in this example I want this rule to only retain snapshots that have a resource key of ‘Important’ and a key value of ‘yes’, so by adding this in here I will ensure that only the EBS snapshots that have this resource tag will be retained by this rule. 

Next up, we have the retention period, and this basically defines how many days the EBS recycle bin will keep your EBS snapshots for before deleting them permanently. And this ranges from 1 - 365 days, and for this demonstration, I will select 10 days.

Then finally at the bottom of the rule you can choose to add a resource tag for it. When you are happy with your rule, simply click on ‘Create retention rule’ 

And then here you can see that it has successfully create the rule, and it’s been given an automatically assigned rule ID.

So as you can see it’s very simple to create a rule for the EBS recycle bin, and now that we’ve created it, let's test it out by deleting my EBS snapshot.

So let me go across to my EBS volumes and create a couple of snapshots. So I want to create 2 snapshots, one snapshot will have a resource tag aligned to the retention rule that I just created and the 2nd one will have no tag. 

So, let’s create the first snapshot, so I select my EBS volume, go to ‘actions’ and ‘create snapshot’. I’ll add in Keep_snapshot as a description and then if I move down to tags, I can add in my key of ‘Important’ as the Value as ‘Yes’. So this will match the retention rule that we created earlier in the recycle bin.

And then to finish, select ‘Create snapshot’

I’ll now create another snapshot, but this time without any tags associated with it. 

So I now have 2 snapshots created, and we can see these in the snapshots section here. 

Now I’m going to delete both of these snapshots and see what happens.

So if I select both, and go to ‘Actions’ and then ‘Delete Snapshot’, and enter the word ‘delete’ to confirm I want to delete these snapshots, and then now you can see they have been deleted. 

However, if we now go to the recycle bin at the top here and then select ‘resources’ on the left, we can see that we have only 1 snapshot that has been captured, and this is the one that matched the resource tags of our rule. If we look at the bin entry date and the bin exit date we can see that there is a 10 day retention period which is what we configured the rule for. 

From here we can quickly recover the snapshot in a couple of clicks, so let’s give that a go. Clicking on recover will then bring us this screen confirming you want to recover resources.

So now if we go back to our snapshots, we can see that it has been recovered. 

So, that was a quick demonstration on how you can use the EBS recycle bin to retain and recover important snapshots that might get accidentally deleted.

About the Author
Learning Paths

Stuart has been working within the IT industry for two decades covering a huge range of topic areas and technologies, from data center and network infrastructure design, to cloud architecture and implementation.

To date, Stuart has created 150+ courses relating to Cloud reaching over 180,000 students, mostly within the AWS category and with a heavy focus on security and compliance.

Stuart is a member of the AWS Community Builders Program for his contributions towards AWS.

He is AWS certified and accredited in addition to being a published author covering topics across the AWS landscape.

In January 2016 Stuart was awarded ‘Expert of the Year Award 2015’ from Experts Exchange for his knowledge share within cloud services to the community.

Stuart enjoys writing about cloud technologies and you will find many of his articles within our blog pages.