You want backups. You don’t want headaches. AWS has a tool for that: EC2 Lifecycle Manager.
It creates EBS snapshots every 7 days and only keeps the last 4. Clean. Automated. AWS-native.
Step 0 – Prerequisites
Before we start clicking:
- Your EC2 instance uses EBS volumes.
- Volumes are tagged (this is how AWS knows what to back up).
- You have IAM permissions to manage DLM (no perms, no party).
Step 1 – Tag Your Volume
Open the AWS Console → EC2 → Volumes.
Find the volume you want to back up (probably the one running your Docker container).
Add a tag:
Key: Backup
Value: True
This tag is your magic marker. Lifecycle Manager will only back up volumes with it.
Step 2 – Create a Lifecycle Policy
- Go to EC2 → Lifecycle Manager (or just search “Lifecycle Manager”).
- Click Create Lifecycle Policy.
- Policy type: EBS Snapshot Policy.
Step 3 – Configure the Policy
Target Resources
- Resource type: Volume
- Resource tags:
Key: Backup
Value: True
Schedule
- Name: WeeklyBackup
- Frequency: Every 7 days
- Start time: 2:00 AM UTC (or whenever traffic is lowest)
- Retention type: Count
- Retain: 4 snapshots
Now AWS will do the work: one snapshot a week, keep only the last 4.
Done
You’ve built a hands-free, AWS-native backup strategy.
No scripts. No cron jobs. No “oops I forgot.”
Just 4 clean, rotating snapshots like clockwork.
Subscribe to new posts
Processing your application
Please check your inbox and click the link to confirm your subscription
There was an error sending the email