In this article, we will see how to use Lifecycle Manager to automate the creation, retention, and deletion of snapshots taken to back up our Amazon EBS volumes. This automation helps us to protect valuable data by enforcing a regular backup, retain backups, reduce storage costs by deleting older backups.
The following are the key elements of AWS Data Lifecycle Manager.
- Snapshots: Snapshot is the way to back up data from your EBS volumes.
- Target Resource Tags: AWS Lifecycle Manager uses resource tags to identify the EBS volumes to back up
- Snapshot Tags: AWS Lifecycle Manager applies the “aws:dlm:lifecycle-policy-id” and “aws:dlm:lifecycle-schedule-name” tags to all snapshots created by a policy to distinguish them from snapshots created by any other means.
- Lifecycle Policies: This lets us automate the process of taking snapshots, retaining and deleting them.
- AWS Account (Create if you don’t have one).
What we will do?
- Login to AWS.
- Configure and Create AWS Snapshot Lifecycle Policy
Login to AWS
- Click here to go to AWS Login Page.
When we hit the above link, we will see a web page as follows where we are required to login using our login details.
Once you successfully login in to your account, you will see the screen as follows.
Configure and Create AWS Snapshot Lifecycle Policy
Search for EC2 under Services in the Top Left of the screen.
In the left panel, choose Elastic Block Store and click on Lifecycle Manager.
You will see the following screen, click on Create Snapshot Lifecycle Policy.
Provide the Description, Select the resource type to back up, specify the resource tags that identify the volumes or instances to back up. Give a name for the schedule, specify the time at which the policy runs are scheduled to start.
Go through all the available options and click on Create Policy when the policy meets your requirement.
You will see the screen as follows after the policy is created.
On the Lifecycle Manager Dashboard, you can see that the Policy has been created.
If you no more require the policy, select the policy – > click on Actions and then select Delete Lifecycle Snapshot Policy.
Give the confirmation by clicking on Delete Snapshot Lifecycle Policy.
The policy will be deleted and you will see the following screen.
In this article, we saw how the process of taking snapshots of Instances or EBS Volumes, retaining and deleting them can be automated. This will help us to take regular backup, retain backups, reduce storage costs by deleting older backups.