Infiniroot Blog: We sometimes write, too.

Of course we cannot always share details about our work with customers, but nevertheless it is nice to show our technical achievements and share some of our implemented solutions.

How to create automatic snapshots (backups) of EC2 storage volumes using Data Lifecycle Manager

Published on June 22nd 2020


In a previous article we described how automatic backups (snapshots) of EC2 instances could be scheduled using AWS Cloudwatch. Although Cloudwatch does the job, there's a simpler and better way to create snapshots: Data Lifecycle Manager.

Data Lifecycle Manager

Data Lifecycle Manager (DLM) can be found inside the EC2 service under the Elastic Block Storage (EBS) navigation point. It was made to manage and schedule the creation and deletion of EBS snapshots and is relatively new (introduced in July 2018).

Welcome to Data Lifecycle Manager

DLM runs one or more policies where each policy has its own schedule and its own targets. Targets can be either EBS volumes or EC2 instances selected by tags.

The nice thing is: DLM is much easier and more self-explanatory than the previous volume snapshot method using Cloudwatch.

Create a new Snapshot Lifecycle Policy

There is a couple of information which needs to be entered in order to create a policy:

Create new policy in Data Lifecycle Manager

After defining the schedule, optional settings can be selected:

The creation of the policy ends with two more settings: IAM Role (which can use the default rule) and whether or not to enable to policy straight away:

At the end a summary is shown how the policy was scheduled. Note the maximum number of snapshots! It may be too few, depending on the snapshot frequency.

The snapshots are showing up

The snapshots created by a DLM policy are showing up under Elastic Block Store -> Snapshots. A nice difference can be seen here between the Cloudwatch and the DLM snapshot method: The snapshots created by Data Lifecycle Manager contain a description which policy is at the origin of the snapshot! This makes it much easier to spot the wanted volume snapshot.

EBS Volume Snapshots created by Data Lifecycle Manager Policy