• hey@aysharshad.com
  • Norway
AWS Data Lifecycle Manager: A Quick way to automate AMI and Snapshot  Management

AWS Data Lifecycle Manager: A Quick way to automate AMI and Snapshot Management

AWS provides a quick and easy way to maintain your backups through AMIs and Snapshots. You can manually create AMIs and Snapshots of your EC2 Instance or you can automate this procedure for your ease. Automating the procedure lifts off the responsibility to generate updated AMIs and Snapshots. You can set retention policies and nominate your specified region for backup as well. This article will focus on discussing the AWS Data Lifecycle Management Policy. I will share the Best Practices as per my opinion and experience.

EBS Snapshot

Snapshots are a point in time backup of your data stored on your EBS Storage Volumes.

Fun Facts:

  1. Data on Boot drives and Block storage volumes are also preserved using these snapshots.
  2. Snapshots can be created for EBS Volumes that may or may not be attached to an instance.
  3. EBS Snapshots serve the purpose of disaster recovery and data or system migration across regions or accounts.
Amazon Machine Image (AMI)

AMI is a combination of 

  1. AMI serves as a backup solution to store a specific state of system configurations with respect to the time at which the AMI was created.
  2. AMI consists of the following units: 
    • System configurations stored on the Boot volume.
    • One or more EBS Volume Snapshots containing data stored in Original System’s drives. 
    • A block device mapping that acts as a guide to attach volumes when the instance is launched.
    • Launch permissions specify who can use the AMI to launch instances.

Data Life Cycle Manager

Data Lifecycle Policy provides two types of backup solutions:

  1. EBS Snapshots.
  2. EBS backed AMIs.

Data Lifecycle Manager helps you to:

  1. Create EBS Snapshots and AMIs.
  2. Retain them for a calculated period of time.
  3. After the retention period expires automatically decommissions the Snapshots and AMIs created by Data Lifecycle Policy.
Benefits of DLM Policy

DLM Policy acts as a primary unit of the Disaster Recovery System. The EBS Snapshots and EBS backed AMIs created by DLM Policy act as a constant backup generating system. It offers the following great benefits:

  1. Automated backup generating service runs on its own schedule.
  2. Cross-region backup generation to ensure data protection.
  3. A retention policy is part of the DLM Policy that defines when a Snapshot or AMI is going to be deleted. Retention policy takes away the hassle of manually deleting obsolete Snapshots and AMIs. Retention Policy involves to units:
    • Count of Snapshots/AMIs created. This number can range between (1 to 1000).
    • Age of Snapshots/AMIs created.
Types of Lifecycle Policy
  1. EBS Snapshot Policy:  Creates snapshots of EBS Volumes.
  2. EBS backed AMI Policy: Creates EBS backed AMIs of specified Instances.
  3. Cross-Account copy Event Policy: Automatically copies shared snapshots across accounts.
How to set up DLM Policy?
  1. Go to the console space of EC2 Service.
  2. Find Lifecycle Manager under Elastic Block Store options in the left pane.
  3. Choose your Lifecycle policy option. There are two types of policy options available that include EBS Snapshot Policy, EBS backed AMI Policy and Cross-Account Copy Event Policy.
  4. Specify the Target group for your policy either Volumes or Instances.
  5. Configure the schedule for your policy. This portion includes configurations regarding the time when Snapshots/AMIs will be created, retention period and if you want to export them to other regions. 
  6. Once the policy is live your policy will work on its own. Among your own AMIs you can differentiate on the bases of Tags that are attached with Snapshots/AMIs.
error: Content is protected. You are automatically reported to the Authorities!