Wednesday, October 29, 2025

AWS Data Lifecycle Manager (DLM) setup for automated EC2 backups

Step 1: Choose “Custom policy” (as shown)

Keep:

  • Custom policy → selected

  • Policy typeEBS snapshot policy
    Then click Next step 🟧

Step 2: Target Resource Type

  • Resource type: Select Volume

  • Target resource tags:
    Add the tag you used on your EC2 volume, for example:

    • Key: Backup

    • Value: Daily

Only the volumes with this tag will be backed up automatically.

Step 3: Configure Schedule

  • Schedule name: Daily-EC2-Backup (or Weekly if preferred)

  • Frequency: Every 24 hours (for daily) or Every 7 days (for weekly)

  • Start time: Choose off-peak (e.g., 02:00 UTC)

  • Retention type: “Count”

  • Retain: 7 snapshots (automatically delete older ones)

Enable these options:

  • Copy tags from source

  • Exclude boot volumes (optional — keep unchecked if you want full backups including OS)

Step 4: IAM Role

If this is your first lifecycle policy:

  • Choose “Create new role for this policy”
    AWS will auto-generate permissions for DLM to create/delete snapshots.

Step 5: Review and Create

  • Review your policy summary (target tag, schedule, retention, IAM role)

  • Click Create Policy

Verification

After 24 hours (or at next schedule), go to:
👉 EC2 → Snapshots
You’ll see entries like:

“Created by EC2 Lifecycle Policy: Daily-EC2-Backup”

That confirms your automation works.


No comments:

Post a Comment