DEV Community

Cover image for Snapshot Management Using Lifecycle Manager
Thu Kha Kyawe
Thu Kha Kyawe

Posted on

Snapshot Management Using Lifecycle Manager

  • Open the EC2 console page from AWS Console

1. Accessing the EC2 Console

  • Click on Lifecycle Manager on the left side menu and there is no lifecycle policies defined on the welcome screen.

2. Checking Lifecycle Manager

  • Click on Snapshots on the left side menu

3. Verifying Existing Snapshots

  • Filter the snapshots using the "environment" tag key and you will see there is no snapshot

4. Creating a Prod Snapshot Policy

  • Click on Lifecycle Manager on the left side menu and click Next step

4.1. Policy Setup & Target Tags

  • Click on Target resource tags and select environment and prod as the tag key

  • Click Add

4.2. Policy Description & IAM Role

  • Write prod-snapshot-policy at Policy description

  • Select Choose another role and select AWSDataLifecycleManagerDefaultRole

  • Click Next

4.3. Schedule Configuration

  • Fill the information:

  • Schedule name- Schedule 1

  • Frequency - Daily

  • Every - 1 hour

  • Starting at - 09:00

  • Retention type - Age

  • Expire from standard tier - 1

  • after creation - days

and Click checkbox of Copy tags from source

4.4. Policy Review and Creation

  • Click Review policy

  • Click Create policy`

4.5 Policy Creation Result

  • Now The policy should be created like this

5. Creating a Dev Snapshot Policy

  • Let create another policy for environment:dev

  • Select Custom policy

  • Select EBS snapshot policy

  • Click Next

5.1 Policy Type & Target Tags

  • - Click on Target resource tags and select environment and dev as the tag key and click Add

5.2. Policy Description & IAM Role

  • Write dev-snapshot-policy at Policy description

  • Select Choose another role and select AWSDataLifecycleManagerDefaultRole

  • Click Next

5.3. Schedule Configuration

  • Fill the information:

  • Schedule name- Schedule 1

  • Frequency - Daily

  • Every - 1 hour

  • Starting at - 09:00

  • Retention type - Age

  • Expire from standard tier - 1

  • after creation - days

and Click checkbox of Copy tags from source

5.4. Policy Review and Creation

  • Click Review policy

  • Click Create policy`

6. Policy Creation Result

  • Now The policy should be created like this

7. Verifying Automated Snapshots

  • After a couple of hours of the prod and dev snapshot policies being created, you should be able to see the first snapshots created by Lifecycle Manager. The snapshots will have a tag key dlm:managed set to a value of "true".

Resources & Next Steps


Top comments (0)