Step 1: Choose “Custom policy” (as shown)
Keep:
-
Custom policy → selected
-
Policy type →
EBS 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) orEvery 7 days(for weekly) -
Start time: Choose off-peak (e.g.,
02:00 UTC) -
Retention type: “Count”
-
Retain:
7snapshots (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